equal
deleted
inserted
replaced
218 ) |
218 ) |
219 |
219 |
220 |
220 |
221 def _mbox(mbox, sender, recipients, msg): |
221 def _mbox(mbox, sender, recipients, msg): |
222 '''write mails to mbox''' |
222 '''write mails to mbox''' |
|
223 # TODO: use python mbox library for proper locking |
223 with open(mbox, b'ab+') as fp: |
224 with open(mbox, b'ab+') as fp: |
224 # Should be time.asctime(), but Windows prints 2-characters day |
225 # Should be time.asctime(), but Windows prints 2-characters day |
225 # of month instead of one. Make them print the same thing. |
226 # of month instead of one. Make them print the same thing. |
226 date = time.strftime('%a %b %d %H:%M:%S %Y', time.localtime()) |
227 date = time.strftime('%a %b %d %H:%M:%S %Y', time.localtime()) |
227 fp.write( |
228 fp.write( |