Mercurial > hg
comparison mercurial/posix.py @ 14234:600e64004eb5
rename explain_exit to explainexit
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Fri, 06 May 2011 15:31:09 +0200 |
parents | 659f34b833b9 |
children | b9e1b041744f |
comparison
equal
deleted
inserted
replaced
14233:659f34b833b9 | 14234:600e64004eb5 |
---|---|
208 os.kill(pid, 0) | 208 os.kill(pid, 0) |
209 return True | 209 return True |
210 except OSError, inst: | 210 except OSError, inst: |
211 return inst.errno != errno.ESRCH | 211 return inst.errno != errno.ESRCH |
212 | 212 |
213 def explain_exit(code): | 213 def explainexit(code): |
214 """return a 2-tuple (desc, code) describing a subprocess status | 214 """return a 2-tuple (desc, code) describing a subprocess status |
215 (codes from kill are negative - not os.system/wait encoding)""" | 215 (codes from kill are negative - not os.system/wait encoding)""" |
216 if code >= 0: | 216 if code >= 0: |
217 return _("exited with status %d") % code, code | 217 return _("exited with status %d") % code, code |
218 return _("killed by signal %d") % -code, -code | 218 return _("killed by signal %d") % -code, -code |