subunitrun: Extend hack to cope with older system subunit run installs.
authorJelmer Vernooij <jelmer@samba.org>
Thu, 9 Dec 2010 22:28:25 +0000 (23:28 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Fri, 10 Dec 2010 02:04:06 +0000 (03:04 +0100)
source4/scripting/bin/subunitrun

index 4078562ab440e1e4a670c1a92bd669147fa649b9..9717c9e345ad8b3ce78cc4194783f9df0fe09135 100755 (executable)
@@ -30,6 +30,8 @@ try:
     from subunit.run import SubunitTestRunner, TestProgram
 except ImportError:
     del sys.modules["subunit"]
+    if "subunit.run" in sys.modules:
+        del sys.modules["subunit.run"]
     samba.import_bundled_package("subunit", "subunit/python")
     from subunit.run import SubunitTestRunner, TestProgram
 import samba.getopt as options