From: genone Date: Wed, 30 May 2007 18:03:44 +0000 (-0000) Subject: Fix exitcode handling of os.system() X-Git-Tag: gentoolkit-0.2.4.3~108 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1fc0363a236d56aea48a5366e5def6a6cfc4adff;p=gentoolkit.git Fix exitcode handling of os.system() svn path=/; revision=405 --- diff --git a/trunk/src/glsa-check/glsa-check b/trunk/src/glsa-check/glsa-check index 5789547..c7aec45 100644 --- a/trunk/src/glsa-check/glsa-check +++ b/trunk/src/glsa-check/glsa-check @@ -250,6 +250,9 @@ if mode in ["dump", "fix", "inject", "pretend"]: if verbose: sys.stderr.write(emergecmd+"\n") exitcode = os.system(emergecmd) + # system() returns the exitcode in the high byte of a 16bit integer + if exitcode >= 1<<8: + exitcode >>= 8 if exitcode: sys.exit(exitcode) myglsa.inject()