From 9f9a355c58aa7dea231c62ac1270907672f4a7ec Mon Sep 17 00:00:00 2001 From: bmcustodio Date: Sun, 25 Nov 2012 08:24:11 +0000 Subject: [PATCH] Fixes critical bug in 'flake8/util.py' causing 'flake8' to crash during code analysis. --- CONTRIBUTORS.txt | 3 ++- flake8/util.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 0c9e151..3200c2f 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -15,4 +15,5 @@ Contributors (by order of appearance) : - David Cramer - Peter Teichman - Oleg Broytman -- Marc Labbé +- Marc Labbé +- Bruno Miguel Custódio diff --git a/flake8/util.py b/flake8/util.py index 8f1877d..c9a6a75 100644 --- a/flake8/util.py +++ b/flake8/util.py @@ -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: