diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2010-08-19 07:04:27 (GMT) |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2010-08-19 07:04:27 (GMT) |
commit | 72994f6df3820961aa5b66492ca04ec21c494b7f (patch) | |
tree | 51b86eef58b06666eb3c23765e5e53a428e22e2a /Lib/imaplib.py | |
parent | 790c9af79ec02dfb10dc97bd687ed67c21783108 (diff) | |
download | cpython-72994f6df3820961aa5b66492ca04ec21c494b7f.zip cpython-72994f6df3820961aa5b66492ca04ec21c494b7f.tar.gz cpython-72994f6df3820961aa5b66492ca04ec21c494b7f.tar.bz2 |
Merged revisions 84195 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84195 | senthil.kumaran | 2010-08-19 12:32:20 +0530 (Thu, 19 Aug 2010) | 3 lines
Fix Issue9638 - remove dead code from py3k imaplib
........
Diffstat (limited to 'Lib/imaplib.py')
-rw-r--r-- | Lib/imaplib.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/Lib/imaplib.py b/Lib/imaplib.py index 2699fd4..9b0fd3b 100644 --- a/Lib/imaplib.py +++ b/Lib/imaplib.py @@ -147,8 +147,6 @@ class IMAP4: class abort(error): pass # Service errors - close and retry class readonly(abort): pass # Mailbox status changed to READ-ONLY - mustquote = re.compile(br"[^\w!#$%&'*+,.:;<=>?^`|~-]", re.ASCII) - def __init__(self, host = '', port = IMAP4_PORT): self.debug = Debug self.state = 'LOGOUT' @@ -846,7 +844,6 @@ class IMAP4: if arg is None: continue if isinstance(arg, str): arg = bytes(arg, "ASCII") - #data = data + b' ' + self._checkquote(arg) data = data + b' ' + arg literal = self.literal @@ -1055,18 +1052,6 @@ class IMAP4: return tag - def _checkquote(self, arg): - - # Must quote command args if non-alphanumeric chars present, - # and not already quoted. - - if len(arg) >= 2 and (arg[0],arg[-1]) in (('(',')'),('"','"')): - return arg - if arg and self.mustquote.search(arg) is None: - return arg - return self._quote(arg) - - def _quote(self, arg): arg = arg.replace(b'\\', b'\\\\') |