]> granicus.if.org Git - python/commitdiff
Set sys.modules[name] to None instead of 0 to block module import.
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>
Tue, 13 Jul 2010 14:50:16 +0000 (14:50 +0000)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>
Tue, 13 Jul 2010 14:50:16 +0000 (14:50 +0000)
Lib/test/support.py

index 83d7ba801784ca4d3d4c5501e36aa8b57ba6e7a9..558fbc2a18175155cae3b582a03a02eb1af6c61a 100644 (file)
@@ -109,7 +109,7 @@ def _save_and_block_module(name, orig_modules):
         orig_modules[name] = sys.modules[name]
     except KeyError:
         saved = False
-    sys.modules[name] = 0
+    sys.modules[name] = None
     return saved