Fixes error (#5902)
Fixes "TypeError: cannot use a string pattern on a bytes-like object"
This commit is contained in:
parent
d9e7654602
commit
0330499bb9
1 changed files with 1 additions and 1 deletions
|
|
@ -225,7 +225,7 @@ class EmailServer:
|
|||
|
||||
def parse_imap_responce(self, cmd, responce):
|
||||
pattern = r"(?<={cmd} )[0-9]*".format(cmd=cmd)
|
||||
match = re.search(pattern, responce, re.U | re.I)
|
||||
match = re.search(pattern, responce.decode('utf-8'), re.U | re.I)
|
||||
if match:
|
||||
return match.group(0)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue