Fixes critical bug in 'flake8/util.py' causing 'flake8' to crash during code analysis.

This commit is contained in:
bmcustodio 2012-11-25 08:24:11 +00:00
parent 194bab1944
commit 9f9a355c58
2 changed files with 3 additions and 2 deletions

View file

@ -15,4 +15,5 @@ Contributors (by order of appearance) :
- David Cramer
- Peter Teichman
- Oleg Broytman
- Marc Labbé
- Marc Labbé
- Bruno Miguel Custódio

View file

@ -5,7 +5,7 @@ import os
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'):
# McCabe's warnings cannot be skipped afaik, and they're all strings.
return False
if warning.message.split()[0] in ignore: