Using isinstance instead type
This patch uses isinstance, like Thomas pointed in their last commit.
This commit is contained in:
parent
d8149c1ec1
commit
49c85d732d
@ -482,7 +482,7 @@ class IMAPFolder(BaseFolder):
|
|||||||
item[1], flags=re.IGNORECASE):
|
item[1], flags=re.IGNORECASE):
|
||||||
found = item[0]
|
found = item[0]
|
||||||
elif found is not None:
|
elif found is not None:
|
||||||
if type(item) == type(b""):
|
if isinstance(item, bytes):
|
||||||
item = item.decode('utf-8')
|
item = item.decode('utf-8')
|
||||||
uid = re.search("UID\s+(\d+)", item, flags=re.IGNORECASE)
|
uid = re.search("UID\s+(\d+)", item, flags=re.IGNORECASE)
|
||||||
if uid:
|
if uid:
|
||||||
|
Loading…
Reference in New Issue
Block a user