more py3 fixes

This commit is contained in:
Tarek Ziade 2012-02-14 21:27:41 +01:00
parent 232fc33060
commit 0ac0cec20f
3 changed files with 4 additions and 3 deletions

View file

@ -182,7 +182,8 @@ def get_code_complexity(code, min=7, filename='stdin'):
complex = []
try:
ast = parse(code)
except AttributeError as e:
except AttributeError:
e = sys.exc_info()[1]
sys.stderr.write("Unable to parse %s: %s\n" % (filename, e))
return 0