[Checkins] SVN: lovely.recipe/trunk/src/lovely/recipe/importchecker/importchecker.py seems like python2.5 returns a 3-tuple from stmt.asList(), this should handle both 2.4 and 2.5

Adam Groszer agroszer at gmail.com
Wed Feb 4 11:37:38 EST 2009


Log message for revision 96082:
  seems like python2.5 returns a 3-tuple from stmt.asList(), this should handle both 2.4 and 2.5
  

Changed:
  U   lovely.recipe/trunk/src/lovely/recipe/importchecker/importchecker.py

-=-
Modified: lovely.recipe/trunk/src/lovely/recipe/importchecker/importchecker.py
===================================================================
--- lovely.recipe/trunk/src/lovely/recipe/importchecker/importchecker.py	2009-02-04 15:39:37 UTC (rev 96081)
+++ lovely.recipe/trunk/src/lovely/recipe/importchecker/importchecker.py	2009-02-04 16:37:38 UTC (rev 96082)
@@ -67,7 +67,9 @@
     def visitFrom(self, stmt):
         """Will be called for 'from foo import bar' statements
         """
-        module_name, names = stmt.asList()
+        x = stmt.asList()
+        module_name = x[0]
+        names = x[1]
         if module_name == '__future__':
             # we don't care what's imported from the future
             return
@@ -351,4 +353,3 @@
 
 if __name__ == '__main__':
     main()
-



More information about the Checkins mailing list