Avoid copying array every time, just slice it
Suggested-by: Josh Berry Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
This commit is contained in:
parent
1f2e8af8aa
commit
aa55b38e26
@ -17,6 +17,8 @@ OfflineIMAP v6.5.6.1 (YYYY-MM-DD)
|
|||||||
|
|
||||||
* Various fixes in documentation.
|
* Various fixes in documentation.
|
||||||
|
|
||||||
|
* Fix unbounded recursion during flag update (Josh Berry).
|
||||||
|
|
||||||
|
|
||||||
OfflineIMAP v6.5.6 (2014-05-14)
|
OfflineIMAP v6.5.6 (2014-05-14)
|
||||||
===============================
|
===============================
|
||||||
|
@ -801,9 +801,9 @@ class IMAPFolder(BaseFolder):
|
|||||||
def __processmessagesflags(self, operation, uidlist, flags):
|
def __processmessagesflags(self, operation, uidlist, flags):
|
||||||
# Hack for those IMAP servers with a limited line length
|
# Hack for those IMAP servers with a limited line length
|
||||||
batch_size = 100
|
batch_size = 100
|
||||||
while len(uidlist):
|
for i in xrange(0, len(uidlist), batch_size):
|
||||||
self.__processmessagesflags_real(operation, uidlist[:batch_size], flags)
|
self.__processmessagesflags_real(operation,
|
||||||
uidlist = uidlist[batch_size:]
|
uidlist[i:i + batch_size], flags)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user