mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-06 13:06:53 +00:00
Fixes critical bug in 'flake8/util.py' causing 'flake8' to crash during code analysis.
This commit is contained in:
parent
194bab1944
commit
9f9a355c58
2 changed files with 3 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue