Commit 903396ee authored by Alexander Belopolsky's avatar Alexander Belopolsky

Set sys.modules[name] to None instead of 0 to block module import.

parent 9c558bcf
...@@ -109,7 +109,7 @@ def _save_and_block_module(name, orig_modules): ...@@ -109,7 +109,7 @@ def _save_and_block_module(name, orig_modules):
orig_modules[name] = sys.modules[name] orig_modules[name] = sys.modules[name]
except KeyError: except KeyError:
saved = False saved = False
sys.modules[name] = 0 sys.modules[name] = None
return saved return saved
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment