diff options
author | Skip Montanaro <skip@pobox.com> | 2001-02-07 22:46:55 (GMT) |
---|---|---|
committer | Skip Montanaro <skip@pobox.com> | 2001-02-07 22:46:55 (GMT) |
commit | cc012e92b21fbd8476bbaa8d4aa91b7e78111182 (patch) | |
tree | 339df712f147a4070ce27c8d5efccd45f4cd8b44 | |
parent | b38175ef3dd6d951f5e058d85a2d7d62eb424a90 (diff) | |
download | cpython-cc012e92b21fbd8476bbaa8d4aa91b7e78111182.zip cpython-cc012e92b21fbd8476bbaa8d4aa91b7e78111182.tar.gz cpython-cc012e92b21fbd8476bbaa8d4aa91b7e78111182.tar.bz2 |
test for presence of __builtins__ in names before deleting it, enabling this
to work with Jython (ugh! I hate that name!). This closes patch 103665.
-rw-r--r-- | Lib/test/test___all__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test___all__.py b/Lib/test/test___all__.py index 853a816..a3ae956 100644 --- a/Lib/test/test___all__.py +++ b/Lib/test/test___all__.py @@ -13,7 +13,8 @@ def check_all(modname): "%s has no __all__ attribute" % modname) names = {} exec "from %s import *" % modname in names - del names["__builtins__"] + if names.has_key("__builtins__"): + del names["__builtins__"] keys = names.keys() keys.sort() all = list(sys.modules[modname].__all__) # in case it's a tuple |