diff --git a/offlineimap/folder/Base.py b/offlineimap/folder/Base.py index 0d37c2f..5ac3eb2 100644 --- a/offlineimap/folder/Base.py +++ b/offlineimap/folder/Base.py @@ -1086,7 +1086,7 @@ class BaseFolder(object): MailDirFolder('foo') == MaildirFolder('foo') --> False """ - if isinstance(other, basestring): + if isinstance(other, str): return other == self.name return id(self) == id(other) diff --git a/offlineimap/imaputil.py b/offlineimap/imaputil.py index 6a18732..1c0b495 100644 --- a/offlineimap/imaputil.py +++ b/offlineimap/imaputil.py @@ -101,7 +101,7 @@ def imapsplit(imapstring): ['(\\HasNoChildren)', '"."', '"INBOX.Sent"']""" - if not isinstance(imapstring, basestring): + if not isinstance(imapstring, str): __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 diff --git a/offlineimap/repository/IMAP.py b/offlineimap/repository/IMAP.py index eeaa5de..098300f 100644 --- a/offlineimap/repository/IMAP.py +++ b/offlineimap/repository/IMAP.py @@ -393,7 +393,7 @@ class IMAPRepository(BaseRepository): self.imapserver.releaseconnection(imapobj) for s in listresult: if s == None or \ - (isinstance(s, basestring) and s == ''): + (isinstance(s, str) and s == ''): # Bug in imaplib: empty strings in results from # literals. TODO: still relevant? continue