Skip to content
This repository has been archived by the owner on Apr 24, 2019. It is now read-only.

Commit

Permalink
seems like python2.5 returns a 3-tuple from stmt.asList(), this shoul…
Browse files Browse the repository at this point in the history
…d handle both 2.4 and 2.5
  • Loading branch information
Adam Groszer committed Feb 4, 2009
1 parent 4153177 commit fda8bcc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lovely/recipe/importchecker/importchecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ def __init__(self):
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
Expand Down Expand Up @@ -351,4 +353,3 @@ def main(argv = sys.argv):

if __name__ == '__main__':
main()

0 comments on commit fda8bcc

Please sign in to comment.