]> khamidou — GitHub mirrors - imapclient.git/commitdiff
Take care of Python 2/3 xrange/range difference
authorMenno Smits <menno@freshfoo.com>
Mon, 21 May 2012 21:41:19 +0000 (22:41 +0100)
committerMenno Smits <menno@freshfoo.com>
Mon, 21 May 2012 21:41:19 +0000 (22:41 +0100)
imapclient/imapclient.py
imapclient/response_parser.py

index be35cc7d3bbfecf45ea7df72e04150bb5abbf023..0966469ecd5a045a3592fa657f0ab60e5aae765b 100644 (file)
@@ -19,6 +19,8 @@ except ImportError:
 
 from . import imap_utf7
 from .fixed_offset import FixedOffset
+from .six import moves
+xrange = moves.xrange
 
 
 __all__ = ['IMAPClient', 'DELETED', 'SEEN', 'ANSWERED', 'FLAGGED', 'DRAFT', 'RECENT']
index 07eafc1f440ddf165d65ef6811c9853a2a785641..9b841a99e6e6dc3c2cdf485a4b3166ea2c471eea 100644 (file)
@@ -6,7 +6,7 @@
 Parsing for IMAP command responses with focus on FETCH responses as
 returned by imaplib.
 
-Intially inspired by http://effbot.org/zone/simple-iterator-parser.htm
+Initially inspired by http://effbot.org/zone/simple-iterator-parser.htm
 """
 
 #TODO more exact error reporting
@@ -14,7 +14,8 @@ Intially inspired by http://effbot.org/zone/simple-iterator-parser.htm
 import sys
 from datetime import datetime
 
-from .six import advance_iterator
+from .six import advance_iterator, moves
+xrange = moves.xrange
 
 from .fixed_offset import FixedOffset
 from .response_lexer import TokenSource