Fix IMAP.login() to work properly.

Also, add remote tests for imaplib (part of #4471).
This commit is contained in:
Antoine Pitrou 2010-11-09 22:55:55 +00:00
parent adffced3df
commit b1436f185d
3 changed files with 48 additions and 6 deletions

View file

@ -1054,10 +1054,10 @@ class IMAP4:
def _quote(self, arg):
arg = arg.replace(b'\\', b'\\\\')
arg = arg.replace(b'"', b'\\"')
arg = arg.replace('\\', '\\\\')
arg = arg.replace('"', '\\"')
return b'"' + arg + b'"'
return '"' + arg + '"'
def _simple_command(self, name, *args):