[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH XTF 2/3] xtf-runner: provide a set of exit codes for different states



On Thu, Jul 21, 2016 at 05:29:48PM +0100, Wei Liu wrote:
> On Thu, Jul 21, 2016 at 05:27:24PM +0100, Ian Jackson wrote:
> > Wei Liu writes ("[PATCH XTF 2/3] xtf-runner: provide a set of exit codes 
> > for different states"):
> > > +# Return the exit code for different states.
> > > +# Avoid using 1 and 2 because python interpreter uses them.
> > 
> > Python generates `2' too ?  That's quite exciting.  When ?
> > 
> 
> There is vague description on this:
> 
> sys.exit([arg])
> ...
> Unix programs generally use 2 for command line syntax errors and 1 for
> all other kind of errors. If another type of object is passed, None is
> ...
> 
> It doesn't explicitly say the interpreter uses 2. But we'd better err on
> the safe side.
> 

And in practice:

$ python --xxx && echo $?
2

Indeed it uses 2.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.