Rev 5796: Use -Wignore::ImportWarning rather than catching it, in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Mon Apr 18 02:32:32 UTC 2011


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 5796 [merge]
revision-id: pqm at pqm.ubuntu.com-20110418023225-u6xxkipegqztrv9e
parent: pqm at pqm.ubuntu.com-20110418014548-4mge2g9h5b04vpcr
parent: mbp at sourcefrog.net-20110418004408-ecxktkw0kmc6l4ha
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2011-04-18 02:32:25 +0000
message:
  Use -Wignore::ImportWarning rather than catching it,
   to restore py2.4 compatibility
modified:
  Makefile                       Makefile-20050805140406-d96e3498bb61c5bb
  bzrlib/tests/__init__.py       selftest.py-20050531073622-8d0e3c8845c97a64
=== modified file 'Makefile'
--- a/Makefile	2011-04-07 10:36:24 +0000
+++ b/Makefile	2011-04-18 00:44:08 +0000
@@ -42,7 +42,7 @@
 	set -e
 	# Generate a stream for PQM to watch.
 	-$(RM) -f selftest.log
-	$(PYTHON) -Werror -O ./bzr selftest --subunit $(tests) | tee selftest.log
+	$(PYTHON) -Werror -Wignore::ImportWarning -O ./bzr selftest --subunit $(tests) | tee selftest.log
 	# An empty log file should catch errors in the $(PYTHON)
 	# command above (the '|' swallow any errors since 'make'
 	# sees the 'tee' exit code for the whole line

=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py	2011-04-15 06:48:43 +0000
+++ b/bzrlib/tests/__init__.py	2011-04-18 00:44:08 +0000
@@ -4365,7 +4365,7 @@
         try:
             self._module = __import__(self.module_name, {}, {}, [''])
             return True
-        except (ImportError, ImportWarning):
+        except ImportError:
             return False
 
     @property




More information about the bazaar-commits mailing list