mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-08 22:04:17 +00:00
more py3 fixes
This commit is contained in:
parent
232fc33060
commit
0ac0cec20f
3 changed files with 4 additions and 3 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue