diff options
author | kennyballou <kballou@onyx.boisestate.edu> | 2013-01-10 10:59:06 -0700 |
---|---|---|
committer | kballou <kballou@onyx.boisestate.edu> | 2013-01-10 10:59:06 -0700 |
commit | cf72de5d1353040a02804b37aabab744a5ec5c43 (patch) | |
tree | 9c5878b39302a9a58827325a9e93801e0dbcdc68 /xnt | |
parent | af250374bc5e2caee62db326cdb7dceb8bb62b84 (diff) | |
download | xnt-cf72de5d1353040a02804b37aabab744a5ec5c43.tar.gz xnt-cf72de5d1353040a02804b37aabab744a5ec5c43.tar.xz |
Return error (if any) from subsystem calls
Diffstat (limited to 'xnt')
-rw-r--r-- | xnt/tasks.py | 5 |
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 |