diff options
author | Guido van Rossum <guido@python.org> | 1998-04-11 03:11:51 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-04-11 03:11:51 (GMT) |
commit | be14e697423cef4cb3dfb9ca210cc545c7771b8e (patch) | |
tree | c5e1e570fa99e7d792309144d6f2126c7b71550f /Lib/imaplib.py | |
parent | 5c7e8cd26727fe9c32c286d5d051def4f0c29646 (diff) | |
download | cpython-be14e697423cef4cb3dfb9ca210cc545c7771b8e.zip cpython-be14e697423cef4cb3dfb9ca210cc545c7771b8e.tar.gz cpython-be14e697423cef4cb3dfb9ca210cc545c7771b8e.tar.bz2 |
New revision -- sometimes it's AUTH-LOGIN, sometimes AUTH=LOGIN!
Diffstat (limited to 'Lib/imaplib.py')
-rw-r--r-- | Lib/imaplib.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/imaplib.py b/Lib/imaplib.py index bea5498..bbca38e 100644 --- a/Lib/imaplib.py +++ b/Lib/imaplib.py @@ -275,7 +275,8 @@ class IMAP4: (typ, [data]) = <instance>.list(user, password) """ - if not 'AUTH-LOGIN' in self.capabilities: + if not 'AUTH=LOGIN' in self.capabilities \ + and not 'AUTH-LOGIN' in self.capabilities: raise self.error("server doesn't allow LOGIN authorisation") typ, dat = self._simple_command('LOGIN', user, password) if typ != 'OK': @@ -391,6 +392,8 @@ class IMAP4: (typ, [data]) = <instance>.status(mailbox, names) """ name = 'STATUS' + if self.PROTOCOL_VERSION == 'IMAP4': + raise self.error('%s unimplemented in IMAP4 (obtain IMAP4rev1 server, or re-code)' % name) typ, dat = self._simple_command(name, mailbox, names) return self._untagged_response(typ, name) @@ -783,7 +786,7 @@ if __debug__ and __name__ == '__main__': return dat Debug = 4 - M = IMAP4("newcnri") + M = IMAP4() print 'PROTOCOL_VERSION = %s' % M.PROTOCOL_VERSION for cmd,args in test_seq1: |