mirror of
https://github.com/python/cpython.git
synced 2025-11-27 05:44:16 +00:00
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.
This commit is contained in:
parent
b38175ef3d
commit
cc012e92b2
1 changed files with 2 additions and 1 deletions
|
|
@ -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()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue