No need to test for types.StringType
all we want to know is if we got some string'ish type and testing for isinstance 'basestring' is sufficient for that. Remove the import. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
parent
dc67f515b6
commit
ba3a698a67
@ -20,7 +20,6 @@ from offlineimap import folder, imaputil, imapserver, OfflineImapError
|
|||||||
from offlineimap.folder.UIDMaps import MappedIMAPFolder
|
from offlineimap.folder.UIDMaps import MappedIMAPFolder
|
||||||
from offlineimap.threadutil import ExitNotifyThread
|
from offlineimap.threadutil import ExitNotifyThread
|
||||||
from threading import Event
|
from threading import Event
|
||||||
import types
|
|
||||||
import os
|
import os
|
||||||
from sys import exc_info
|
from sys import exc_info
|
||||||
import netrc
|
import netrc
|
||||||
@ -274,9 +273,9 @@ class IMAPRepository(BaseRepository):
|
|||||||
self.imapserver.releaseconnection(imapobj)
|
self.imapserver.releaseconnection(imapobj)
|
||||||
for string in listresult:
|
for string in listresult:
|
||||||
if string == None or \
|
if string == None or \
|
||||||
(type(string) == types.StringType and string == ''):
|
(isinstance(string, basestring) and string == ''):
|
||||||
# Bug in imaplib: empty strings in results from
|
# Bug in imaplib: empty strings in results from
|
||||||
# literals.
|
# literals. TODO: still relevant?
|
||||||
continue
|
continue
|
||||||
flags, delim, name = imaputil.imapsplit(string)
|
flags, delim, name = imaputil.imapsplit(string)
|
||||||
flaglist = [x.lower() for x in imaputil.flagsplit(flags)]
|
flaglist = [x.lower() for x in imaputil.flagsplit(flags)]
|
||||||
|
Loading…
Reference in New Issue
Block a user