summaryrefslogtreecommitdiff
path: root/xnt
diff options
context:
space:
mode:
authorkennyballou <kballou@onyx.boisestate.edu>2013-01-10 10:59:06 -0700
committerkballou <kballou@onyx.boisestate.edu>2013-01-10 10:59:06 -0700
commitcf72de5d1353040a02804b37aabab744a5ec5c43 (patch)
tree9c5878b39302a9a58827325a9e93801e0dbcdc68 /xnt
parentaf250374bc5e2caee62db326cdb7dceb8bb62b84 (diff)
downloadxnt-cf72de5d1353040a02804b37aabab744a5ec5c43.tar.gz
xnt-cf72de5d1353040a02804b37aabab744a5ec5c43.tar.xz
Return error (if any) from subsystem calls
Diffstat (limited to 'xnt')
-rw-r--r--xnt/tasks.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/xnt/tasks.py b/xnt/tasks.py
index 569043d..119e2fd 100644
--- a/xnt/tasks.py
+++ b/xnt/tasks.py
@@ -118,7 +118,7 @@ def call(command, stdout=None, stderr=None):
param: stdout - file to redirect standard output to, if given
param: stderr - file to redirect standard error to, if given
"""
- subprocess.call(args=command, stdout=stdout, stderr=stderr)
+ return subprocess.call(args=command, stdout=stdout, stderr=stderr)
def setup(commands, dir=""):
"""
@@ -132,5 +132,6 @@ def setup(commands, dir=""):
cwd = os.getcwd()
if dir:
os.chdir(dir)
- call(cmd)
+ ec = call(cmd)
os.chdir(cwd)
+ return ec