Kaydet (Commit) cc012e92 authored tarafından Skip Montanaro's avatar Skip Montanaro

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.
üst b38175ef
...@@ -13,6 +13,7 @@ def check_all(modname): ...@@ -13,6 +13,7 @@ def check_all(modname):
"%s has no __all__ attribute" % modname) "%s has no __all__ attribute" % modname)
names = {} names = {}
exec "from %s import *" % modname in names exec "from %s import *" % modname in names
if names.has_key("__builtins__"):
del names["__builtins__"] del names["__builtins__"]
keys = names.keys() keys = names.keys()
keys.sort() keys.sort()
......
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