Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
14f39402
Commit
14f39402
authored
Aug 31, 2005
by
Piers Lauder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed select() so readonly flag is treated as a boolean
parent
a47d1c08
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Lib/imaplib.py
Lib/imaplib.py
+4
-4
No files found.
Lib/imaplib.py
View file @
14f39402
...
...
@@ -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
=
Non
e
):
def
select
(
self
,
mailbox
=
'INBOX'
,
readonly
=
Fals
e
):
"""Select a mailbox.
Flush all untagged responses.
(typ, [data]) = <instance>.select(mailbox='INBOX', readonly=
Non
e)
(typ, [data]) = <instance>.select(mailbox='INBOX', readonly=
Fals
e)
'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'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment