Fixed an issue in the pyflakes checker module (taken from Github).

Tue, 28 Oct 2014 09:58:50 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 28 Oct 2014 09:58:50 +0100
changeset 3889
9357550095a1
parent 3887
dff6e8f27c4c
child 3891
f6ac4b481bdb

Fixed an issue in the pyflakes checker module (taken from Github).

Plugins/CheckerPlugins/SyntaxChecker/pyflakes/checker.py file | annotate | diff | comparison | revisions
--- a/Plugins/CheckerPlugins/SyntaxChecker/pyflakes/checker.py	Tue Oct 28 09:19:12 2014 +0100
+++ b/Plugins/CheckerPlugins/SyntaxChecker/pyflakes/checker.py	Tue Oct 28 09:58:50 2014 +0100
@@ -700,7 +700,11 @@
             raise RuntimeError("Got impossible expression context: %r" % (node.ctx,))
 
     def RETURN(self, node):
-        if node.value and not self.scope.returnValue:
+        if (
+            node.value and
+            hasattr(self.scope, 'returnValue') and
+            not self.scope.returnValue
+        ):
             self.scope.returnValue = node.value
         self.handleNode(node.value, node)
 

eric ide

mercurial