Don't require the string module
There is no need for using the string module if all we want is to split a string at the white space. All pythons since at least 2.4 can do that. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
parent
b768d2d28b
commit
6398bf7795
@ -18,7 +18,6 @@
|
||||
|
||||
import imaplib
|
||||
import rfc822
|
||||
import string
|
||||
import random
|
||||
import binascii
|
||||
import re
|
||||
@ -111,7 +110,7 @@ class IMAPFolder(BaseFolder):
|
||||
self.imapserver.releaseconnection(imapobj)
|
||||
|
||||
# Discard the message number.
|
||||
messagestr = string.split(response[0], maxsplit = 1)[1]
|
||||
messagestr = response[0].split(' ', 1)[1]
|
||||
options = imaputil.flags2hash(messagestr)
|
||||
if not options.has_key('UID'):
|
||||
return True
|
||||
@ -194,7 +193,7 @@ class IMAPFolder(BaseFolder):
|
||||
self.imapserver.releaseconnection(imapobj)
|
||||
for messagestr in response:
|
||||
# Discard the message number.
|
||||
messagestr = string.split(messagestr, maxsplit = 1)[1]
|
||||
messagestr = messagestr.split(' ', 1)[1]
|
||||
options = imaputil.flags2hash(messagestr)
|
||||
if not options.has_key('UID'):
|
||||
self.ui.warn('No UID in message with options %s' %\
|
||||
|
Loading…
Reference in New Issue
Block a user