summaryrefslogtreecommitdiff
path: root/Lib/imaplib.py
diff options
context:
space:
mode:
authorPiers Lauder <piers@cs.su.oz.au>2005-08-31 10:46:29 +0000
committerPiers Lauder <piers@cs.su.oz.au>2005-08-31 10:46:29 +0000
commit7335dd80976d93013ede0b0af9530e363a3474b3 (patch)
tree30e85283c7efda0b1e05e60ec27589d7a4804b25 /Lib/imaplib.py
parentaff4a6809d7b9aa8070d27286df03835e90de754 (diff)
downloadcpython-7335dd80976d93013ede0b0af9530e363a3474b3.tar.gz
changed select() so readonly flag is treated as a boolean
Diffstat (limited to 'Lib/imaplib.py')
-rw-r--r--Lib/imaplib.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/imaplib.py b/Lib/imaplib.py
index 3e829d5dcf..85ecd53cdf 100644
--- a/Lib/imaplib.py
+++ b/Lib/imaplib.py
@@ -155,7 +155,7 @@ class IMAP4:
self.tagged_commands = {} # Tagged commands awaiting response
self.untagged_responses = {} # {typ: [data, ...], ...}
self.continuation_response = '' # Last continuation response
- self.is_readonly = None # READ-ONLY desired state
+ self.is_readonly = False # READ-ONLY desired state
self.tagnum = 0
# Open socket to server.
@@ -622,12 +622,12 @@ class IMAP4:
return self._untagged_response(typ, dat, name)
- def select(self, mailbox='INBOX', readonly=None):
+ def select(self, mailbox='INBOX', readonly=False):
"""Select a mailbox.
Flush all untagged responses.
- (typ, [data]) = <instance>.select(mailbox='INBOX', readonly=None)
+ (typ, [data]) = <instance>.select(mailbox='INBOX', readonly=False)
'data' is count of messages in mailbox ('EXISTS' response).
@@ -636,7 +636,7 @@ class IMAP4:
"""
self.untagged_responses = {} # Flush old responses.
self.is_readonly = readonly
- if readonly is not None:
+ if readonly:
name = 'EXAMINE'
else:
name = 'SELECT'