Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 04da10c

Browse files
committed
Piers Lauder writes:
""" Jochen Hayek has reported a problem with some versions of IMAP4 servers that choose to mix the case in their CAPABILITIES response. The patch below fixes the problem. """
1 parent 3f200d7 commit 04da10c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/imaplib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def __init__(self, host = '', port = IMAP4_PORT):
154154
self._simple_command(cap)
155155
if not self.untagged_responses.has_key(cap):
156156
raise self.error('no CAPABILITY response from server')
157-
self.capabilities = tuple(string.split(self.untagged_responses[cap][-1]))
157+
self.capabilities = tuple(string.split(string.upper(self.untagged_responses[cap][-1])))
158158

159159
if __debug__ and self.debug >= 3:
160160
_mesg('CAPABILITIES: %s' % `self.capabilities`)

0 commit comments

Comments
 (0)