mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
Fix bug in _checkquote that raised an exception on empty "arg".
This commit is contained in:
parent
77d110d6b8
commit
c09acfda77
1 changed files with 2 additions and 2 deletions
|
@ -1008,9 +1008,9 @@ class IMAP4:
|
||||||
|
|
||||||
if type(arg) is not type(''):
|
if type(arg) is not type(''):
|
||||||
return arg
|
return arg
|
||||||
if (arg[0],arg[-1]) in (('(',')'),('"','"')):
|
if len(arg) >= 2 and (arg[0],arg[-1]) in (('(',')'),('"','"')):
|
||||||
return arg
|
return arg
|
||||||
if self.mustquote.search(arg) is None:
|
if arg and self.mustquote.search(arg) is None:
|
||||||
return arg
|
return arg
|
||||||
return self._quote(arg)
|
return self._quote(arg)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue