summaryrefslogtreecommitdiff
path: root/pylint/pyreverse/utils.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2015-12-08 13:41:06 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2015-12-08 13:41:06 +0200
commitb7c95a5a88555314ed6c1a94263f85b0b0e27f24 (patch)
tree5ef19bba5763eeeafedd4d3135d3370909d91ea1 /pylint/pyreverse/utils.py
parentc8c1984ff419189f6ca11888f60cca036cebc9ec (diff)
downloadpylint-git-b7c95a5a88555314ed6c1a94263f85b0b0e27f24.tar.gz
Change the attribute check for using hasattr instead of looking explicitly into __dict__.
Diffstat (limited to 'pylint/pyreverse/utils.py')
-rw-r--r--pylint/pyreverse/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pylint/pyreverse/utils.py b/pylint/pyreverse/utils.py
index 9609ad097..90e973d96 100644
--- a/pylint/pyreverse/utils.py
+++ b/pylint/pyreverse/utils.py
@@ -203,7 +203,7 @@ class LocalsVisitor(ASTWalker):
methods = self.get_callbacks(node)
if methods[0] is not None:
methods[0](node)
- if 'locals' in node.__dict__: # skip Instance and other proxy
+ if hasattr(node, 'locals'): # skip Instance and other proxy
for local_node in node.values():
self.visit(local_node)
if methods[1] is not None: