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.
+ # And we'll get a TypeError otherwise
if warning.message.split() in ignore: