Show More
@@ -208,17 +208,16 b' def _sendmail(ui, sender, recipients, ms' | |||
|
208 | 208 | |
|
209 | 209 | def _mbox(mbox, sender, recipients, msg): |
|
210 | 210 | '''write mails to mbox''' |
|
211 |
|
|
|
212 | # Should be time.asctime(), but Windows prints 2-characters day | |
|
213 | # of month instead of one. Make them print the same thing. | |
|
214 | date = time.strftime('%a %b %d %H:%M:%S %Y', time.localtime()) | |
|
215 | fp.write( | |
|
216 | b'From %s %s\n' | |
|
217 | % (encoding.strtolocal(sender), encoding.strtolocal(date)) | |
|
218 | ) | |
|
219 | fp.write(msg) | |
|
220 | fp.write(b'\n\n') | |
|
221 | fp.close() | |
|
211 | with open(mbox, b'ab+') as fp: | |
|
212 | # Should be time.asctime(), but Windows prints 2-characters day | |
|
213 | # of month instead of one. Make them print the same thing. | |
|
214 | date = time.strftime('%a %b %d %H:%M:%S %Y', time.localtime()) | |
|
215 | fp.write( | |
|
216 | b'From %s %s\n' | |
|
217 | % (encoding.strtolocal(sender), encoding.strtolocal(date)) | |
|
218 | ) | |
|
219 | fp.write(msg) | |
|
220 | fp.write(b'\n\n') | |
|
222 | 221 | |
|
223 | 222 | |
|
224 | 223 | def connect(ui, mbox=None): |
General Comments 0
You need to be logged in to leave comments.
Login now