no need for type(s) == types.StringType
All we want to do here is to test whether we got a string'ish type or a list (literal), so testing for basestring will be fine. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
parent
81fc20c7ca
commit
dc67f515b6
@ -18,7 +18,6 @@
|
||||
|
||||
import re
|
||||
import string
|
||||
import types
|
||||
from offlineimap.ui import getglobalui
|
||||
|
||||
|
||||
@ -88,7 +87,7 @@ def imapsplit(imapstring):
|
||||
|
||||
['(\\HasNoChildren)', '"."', '"INBOX.Sent"']"""
|
||||
|
||||
if type(imapstring) != types.StringType:
|
||||
if not isinstance(imapstring, basestring):
|
||||
debug("imapsplit() got a non-string input; working around.")
|
||||
# Sometimes, imaplib will throw us a tuple if the input
|
||||
# contains a literal. See Python bug
|
||||
|
Loading…
Reference in New Issue
Block a user