fix get_code method for Operator (still ugly, though)

This commit is contained in:
Dave Halter
2014-02-26 22:23:21 +01:00
parent 3330e29748
commit fdabca20e9
3 changed files with 17 additions and 17 deletions
+3 -3
View File
@@ -322,10 +322,10 @@ class Evaluator(object):
# Only the first command is important, the rest should basically not
# happen except in broken code (e.g. docstrings that aren't code).
call = expression_list[0]
if isinstance(call, (str, unicode)):
call_path = [call]
else:
if isinstance(call, pr.Call):
call_path = list(call.generate_call_path())
else:
call_path = [call]
scope = stmt.get_parent_until(pr.IsScope)
pos = stmt.start_pos