Show More
@@ -479,13 +479,6 b' def testpid(pid):' | |||
|
479 | 479 | except OSError as inst: |
|
480 | 480 | return inst.errno != errno.ESRCH |
|
481 | 481 | |
|
482 | def explainexit(code): | |
|
483 | """return a 2-tuple (desc, code) describing a subprocess status | |
|
484 | (codes from kill are negative - not os.system/wait encoding)""" | |
|
485 | if code >= 0: | |
|
486 | return _("exited with status %d") % code, code | |
|
487 | return _("killed by signal %d") % -code, -code | |
|
488 | ||
|
489 | 482 | def isowner(st): |
|
490 | 483 | """Return True if the stat object st is from the current user.""" |
|
491 | 484 | return st.st_uid == os.getuid() |
@@ -52,7 +52,6 b' if pycompat.iswindows:' | |||
|
52 | 52 | else: |
|
53 | 53 | from .. import posix as platform |
|
54 | 54 | |
|
55 | explainexit = platform.explainexit | |
|
56 | 55 | findexe = platform.findexe |
|
57 | 56 | _gethgcmd = platform.gethgcmd |
|
58 | 57 | getuser = platform.getuser |
@@ -79,6 +78,13 b' except AttributeError:' | |||
|
79 | 78 | |
|
80 | 79 | closefds = pycompat.isposix |
|
81 | 80 | |
|
81 | def explainexit(code): | |
|
82 | """return a 2-tuple (desc, code) describing a subprocess status | |
|
83 | (codes from kill are negative - not os.system/wait encoding)""" | |
|
84 | if code >= 0: | |
|
85 | return _("exited with status %d") % code, code | |
|
86 | return _("killed by signal %d") % -code, -code | |
|
87 | ||
|
82 | 88 | class _pfile(object): |
|
83 | 89 | """File-like wrapper for a stream opened by subprocess.Popen()""" |
|
84 | 90 |
@@ -311,9 +311,6 b' def quotecommand(cmd):' | |||
|
311 | 311 | return '"' + cmd + '"' |
|
312 | 312 | return cmd |
|
313 | 313 | |
|
314 | def explainexit(code): | |
|
315 | return _("exited with status %d") % code, code | |
|
316 | ||
|
317 | 314 | # if you change this stub into a real check, please try to implement the |
|
318 | 315 | # username and groupname functions above, too. |
|
319 | 316 | def isowner(st): |
General Comments 0
You need to be logged in to leave comments.
Login now