Add quotes in empty LIST calls

I need add this to get the imap LIST folders.
This commit is contained in:
Rodolfo García Peñas (kix) 2020-08-28 16:03:15 +02:00
parent 6fa099ff74
commit c9a4b1fefa

View File

@ -1358,6 +1358,8 @@ class IMAP4(object):
data = rqb.tag + b' ' + name
for arg in args:
if arg is None: continue
if arg == '':
arg = '""'
if isinstance(arg, str):
arg = bytes(arg, self._encoding)
data = data + b' ' + arg