Removed python2 code in imaputil

This code is marked as python2, could be removed.
This commit is contained in:
Rodolfo García Peñas (kix) 2020-08-29 09:07:15 +02:00
parent a655fa4fc2
commit 99f85737c5

View File

@ -128,13 +128,7 @@ def imapsplit(imapstring):
retval.append(quoted) retval.append(quoted)
workstr = rest workstr = rest
else: else:
splits = None splits = str.split(workstr, maxsplit=1)
# Python2
if hasattr(string, 'split'):
splits = string.split(workstr, maxsplit = 1)
# Python3
else:
splits = str.split(workstr, maxsplit = 1)
splitslen = len(splits) splitslen = len(splits)
# The unquoted word is splits[0]; the remainder is splits[1] # The unquoted word is splits[0]; the remainder is splits[1]
if splitslen == 2: if splitslen == 2: