[PATCH]os.WIFxxx not suported on windows
Thomas Arendsen Hein
thomas at intevation.de
Mon Aug 22 05:11:03 UTC 2005
* Volker.Kleinfeld at gmx.de <Volker.Kleinfeld at gmx.de> [20050821 21:25]:
> when util.system fails "explain_exit(code)" is called. This method uses
> os.WIFxx which is not supported on windows. Attached a small patch fixing
> it.
Have you really seen this error or are just thinking that this might
happen?
> diff -r 4cabedfab66e -r 2e4228ed18e7 mercurial/util.py
> --- a/mercurial/util.py Fri Aug 19 14:41:29 2005
> +++ b/mercurial/util.py Sun Aug 21 18:39:29 2005
> @@ -269,13 +269,16 @@
>
> def explain_exit(code):
> """return a 2-tuple (desc, code) describing a process's status"""
> - if os.WIFEXITED(code):
...
> + if os.name == 'nt': # os.WIFxx is not supported on windows
> + return "aborted with error." , -1
> + else:
> + if os.WIFEXITED(code):
This explain_exit() shouldn't be read when running on Windows,
because there already is a check above:
if os.name == 'nt':
def explain_exit(code):
return "exited with status %d" % code, code
else:
def explain_exit(code):
...
Thomas
--
Email: thomas at intevation.de
http://intevation.de/~thomas/
More information about the Mercurial
mailing list