Commits

Tarek Ziadé committed bf318be Draft

make sure mccacbe catches the syntax errors as warnings

  • Participants
  • Parent commits e3f2b02

Comments (0)

Files changed (1)

File flake8/mccabe.py

     complex = []
     try:
         ast = parse(code)
-    except AttributeError:
+    except (AttributeError, SyntaxError):
         e = sys.exc_info()[1]
         sys.stderr.write("Unable to parse %s: %s\n" % (filename, e))
         return 0