Skip to content

Instantly share code, notes, and snippets.

@spacelis
Created April 23, 2013 14:07
Show Gist options
  • Save spacelis/5443838 to your computer and use it in GitHub Desktop.
Save spacelis/5443838 to your computer and use it in GitHub Desktop.
A temporary workaround of AttributeError when uses code checking
diff --git a/pylibs/pylama/pylint/checkers/logging.py b/pylibs/pylama/pylint/checkers/logging.py
index 4c78d8f..f25b893 100644
@@ -90,6 +90,8 @@ class LoggingChecker(checkers.BaseChecker):
and ancestor.parent.name == 'logging')])]
except astng.exceptions.InferenceError:
return
+ except AttributeError:
+ return
if (node.func.expr.name != self._logging_name and not logger_class):
return
self._check_convenience_methods(node)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment