1. Tarek Ziadé
  2. flake8


Ian Cordasco  committed 448c932

Fixes #57

Don't allow for ignore to be None

  • Participants
  • Parent commits 7158ae6
  • Branches refactor

Comments (0)

Files changed (1)

File flake8/util.py

View file
 def skip_warning(warning, ignore=[]):
     # XXX quick dirty hack, just need to keep the line in the warning
-    if not hasattr(warning, 'message'):
+    if not hasattr(warning, 'message') or ignore is None:
         # McCabe's warnings cannot be skipped afaik, and they're all strings.
+        # And we'll get a TypeError otherwise
         return False
     if warning.message.split()[0] in ignore:
         return True