From 49c85d732d4381b495d1bc2600ca04361998f3e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Mon, 12 Oct 2020 12:52:04 +0200 Subject: [PATCH] Using isinstance instead type This patch uses isinstance, like Thomas pointed in their last commit. --- offlineimap/folder/IMAP.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/offlineimap/folder/IMAP.py b/offlineimap/folder/IMAP.py index a23511e..efeafa7 100644 --- a/offlineimap/folder/IMAP.py +++ b/offlineimap/folder/IMAP.py @@ -482,7 +482,7 @@ class IMAPFolder(BaseFolder): item[1], flags=re.IGNORECASE): found = item[0] elif found is not None: - if type(item) == type(b""): + if isinstance(item, bytes): item = item.decode('utf-8') uid = re.search("UID\s+(\d+)", item, flags=re.IGNORECASE) if uid: