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
9e83608e
Commit
9e83608e
authored
Jun 29, 2012
by
Petri Lehtinen
Browse files
Options
Browse Files
Download
Plain Diff
#9559: Don't call _pre_mailbox_hook more than once
parents
ba9018ed
2c99928b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
Lib/mailbox.py
Lib/mailbox.py
+5
-2
No files found.
Lib/mailbox.py
View file @
9e83608e
...
...
@@ -740,8 +740,11 @@ class _singlefileMailbox(Mailbox):
"""Append message to mailbox and return (start, stop) offsets."""
self
.
_file
.
seek
(
0
,
2
)
before
=
self
.
_file
.
tell
()
if
len
(
self
.
_toc
)
==
0
:
# This is the first message
if
len
(
self
.
_toc
)
==
0
and
not
self
.
_pending
:
# This is the first message, and the _pre_mailbox_hook
# hasn't yet been called. If self._pending is True,
# messages have been removed, so _pre_mailbox_hook must
# have been called already.
self
.
_pre_mailbox_hook
(
self
.
_file
)
try
:
self
.
_pre_message_hook
(
self
.
_file
)
...
...
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