fix for argparse being defined inside the __main__ statement

This commit is contained in:
Chris Mitchell 2015-05-31 18:16:34 -04:00
parent 9abb00a6c2
commit f9d6c8ca0f
1 changed files with 2 additions and 2 deletions

View File

@ -123,9 +123,9 @@ def walk_tree(node):
for key, value in d.items():
if isinstance(value, list):
for val in value:
for _ in walk_tree(val):
for _ in ast.walk(val):
yield _
elif 'ast' in str(type(value)):
elif issubclass(type(value), ast.AST):
for _ in walk_tree(value):
yield _
else: