From 33c942402fbf2f8cb6383e50a72e187e0bc2dfeb Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Sun, 8 Jun 2014 17:56:59 -0400 Subject: [PATCH] Python parser bugfix, again. --- bitshift/parser/python.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bitshift/parser/python.py b/bitshift/parser/python.py index 4cecfc4..b4a7796 100644 --- a/bitshift/parser/python.py +++ b/bitshift/parser/python.py @@ -111,8 +111,10 @@ class _CachedWalker(ast.NodeVisitor): if isinstance(node.func, ast.Name): name = node.func.id - else: + elif isinstance(node.func, ast.Attr): name = node.func.attr + else: # Dynamically selected functions, etc: + return if not self.accum['functions'].has_key(name): self.accum['functions'][name] = {'assignments': [], 'uses': []}