fix graft() when using dir(module)
This commit is contained in:
parent
4bb4143daa
commit
884e48970e
1 changed files with 1 additions and 1 deletions
|
@ -112,7 +112,7 @@ def graft(target, source, names=None):
|
|||
if hasattr(source, '__all__'):
|
||||
names = source.__all__
|
||||
else:
|
||||
names = dir(source)
|
||||
names = [x for x in dir(source) if not x.startswith('_')]
|
||||
elif isinstance(names, basestring):
|
||||
names = [names]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue