Commits

Anonymous committed 2ab1a4c

Not adding None returned values

  • Participants
  • Parent commits a898901

Comments (0)

Files changed (1)

rope/base/pyobjects.py

         self.generator = False
 
     def _Return(self, node):
-        self.returned_asts.append(node.value)
+        if node.value is not None:
+            self.returned_asts.append(node.value)
 
     def _Yield(self, node):
-        self.returned_asts.append(node.value)
+        if node.value is not None:
+            self.returned_asts.append(node.value)
         self.generator = True