hg-1.4 test, solaris: 5 errors

Mads Kiilerich mads at kiilerich.com
Sun Nov 8 13:06:04 CST 2009


rupert.thurner wrote, On 11/08/2009 08:00 PM:
> i am confused by this. even the exit code of os.system differs.
>
> $ python
> Python 2.6.4 (r264:75706, Oct 29 2009, 15:38:25)
> [GCC 4.4.1] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import os
>>>> os.system('asdf')
> sh: asdf: not found
> 32512
>>>> import subprocess
>>>> subprocess.call('asdf',shell=True)
> /bin/sh: asdf: not found
> 127

os.system uses the encoding from os.waitpid where the exitvalue has been 
shifted 8 bits.

/Mads


More information about the Mercurial-devel mailing list