#15036: Make a repeated changes and flushes work with single-file mailboxes

This commit is contained in:
Petri Lehtinen 2012-06-15 21:01:39 +03:00
commit a717d563d0
3 changed files with 16 additions and 0 deletions

View file

@ -675,6 +675,7 @@ class _singlefileMailbox(Mailbox):
new_file.write(buffer)
new_toc[key] = (new_start, new_file.tell())
self._post_message_hook(new_file)
self._file_length = new_file.tell()
except:
new_file.close()
os.remove(new_file.name)