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:
Sebastian Spaeth 2012-02-05 12:20:28 +01:00
parent 81fc20c7ca
commit dc67f515b6

View File

@ -18,7 +18,6 @@
import re import re
import string import string
import types
from offlineimap.ui import getglobalui from offlineimap.ui import getglobalui
@ -88,7 +87,7 @@ def imapsplit(imapstring):
['(\\HasNoChildren)', '"."', '"INBOX.Sent"']""" ['(\\HasNoChildren)', '"."', '"INBOX.Sent"']"""
if type(imapstring) != types.StringType: if not isinstance(imapstring, basestring):
debug("imapsplit() got a non-string input; working around.") debug("imapsplit() got a non-string input; working around.")
# Sometimes, imaplib will throw us a tuple if the input # Sometimes, imaplib will throw us a tuple if the input
# contains a literal. See Python bug # contains a literal. See Python bug