diff options
author | Sol Jerome <solj@ices.utexas.edu> | 2010-03-22 16:14:45 +0000 |
---|---|---|
committer | Sol Jerome <solj@ices.utexas.edu> | 2010-03-22 11:15:11 -0500 |
commit | bae5d0f8ff6b762071b5a00a18b8d4453652e665 (patch) | |
tree | c69bce7813d9ef02b9470d8b2b1544589b161d0b /src | |
parent | 424d355b48b7dccdb345f1f9ff7afe506e4388c8 (diff) | |
download | bcfg2-bae5d0f8ff6b762071b5a00a18b8d4453652e665.tar.gz bcfg2-bae5d0f8ff6b762071b5a00a18b8d4453652e665.tar.bz2 bcfg2-bae5d0f8ff6b762071b5a00a18b8d4453652e665.zip |
Client/Tools/__init__.py: Report return value in lower bits of cmdstat
The return value was being stored in the upper eight bits of cmdstat.
This change shifts that value to the lower bits so that comparisons in
calling methods will be reliable.
Signed-off-by: Sol Jerome <solj@ices.utexas.edu>
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5783 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Client/Tools/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/Client/Tools/__init__.py b/src/lib/Client/Tools/__init__.py index 33a0e19c1..671c5f01d 100644 --- a/src/lib/Client/Tools/__init__.py +++ b/src/lib/Client/Tools/__init__.py @@ -86,7 +86,10 @@ class executor: cmdstat = runpipe.poll() output += [line[:-1] for line in runpipe.fromchild.readlines() \ if line] - return (cmdstat, output) + # The exit code from the program is in the upper byte of the + # value returned by cmdstat. Shift it down for tools looking at + # the value. + return ((cmdstat >> 8), output) class Tool: ''' |