]> granicus.if.org Git - python/commitdiff
New revision -- sometimes it's AUTH-LOGIN, sometimes AUTH=LOGIN!
authorGuido van Rossum <guido@python.org>
Sat, 11 Apr 1998 03:11:51 +0000 (03:11 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 11 Apr 1998 03:11:51 +0000 (03:11 +0000)
Lib/imaplib.py

index bea54987172611f3443abd48f4f3ad02c38829a9..bbca38e5c11a94924c5f81ff03c91ac0ecd2a71a 100644 (file)
@@ -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: