Mercurial > hg
comparison mercurial/mail.py @ 37463:bbd240f81ac5
procutil: make explainexit() simply return a message (API)
Almost all callers want it.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 07 Apr 2018 21:23:42 +0900 |
parents | 00e4bd97b095 |
children | 7edf68862fe3 |
comparison
equal
deleted
inserted
replaced
37462:c0d0fd87ba7c | 37463:bbd240f81ac5 |
---|---|
148 fp.write(util.tonativeeol(msg)) | 148 fp.write(util.tonativeeol(msg)) |
149 ret = fp.close() | 149 ret = fp.close() |
150 if ret: | 150 if ret: |
151 raise error.Abort('%s %s' % ( | 151 raise error.Abort('%s %s' % ( |
152 os.path.basename(program.split(None, 1)[0]), | 152 os.path.basename(program.split(None, 1)[0]), |
153 procutil.explainexit(ret)[0])) | 153 procutil.explainexit(ret))) |
154 | 154 |
155 def _mbox(mbox, sender, recipients, msg): | 155 def _mbox(mbox, sender, recipients, msg): |
156 '''write mails to mbox''' | 156 '''write mails to mbox''' |
157 fp = open(mbox, 'ab+') | 157 fp = open(mbox, 'ab+') |
158 # Should be time.asctime(), but Windows prints 2-characters day | 158 # Should be time.asctime(), but Windows prints 2-characters day |