[ostree] ostbuild: Ensure we return the right process exit code
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] ostbuild: Ensure we return the right process exit code
- Date: Fri, 27 Jan 2012 16:11:47 +0000 (UTC)
commit 3426de05fe4b647a1687842403d27c42d41427d6
Author: Colin Walters <walters verbum org>
Date: Fri Jan 27 08:51:12 2012 -0500
ostbuild: Ensure we return the right process exit code
src/ostbuild/pyostbuild/subprocess_helpers.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/ostbuild/pyostbuild/subprocess_helpers.py b/src/ostbuild/pyostbuild/subprocess_helpers.py
index 0d1ca8d..116d0fb 100755
--- a/src/ostbuild/pyostbuild/subprocess_helpers.py
+++ b/src/ostbuild/pyostbuild/subprocess_helpers.py
@@ -126,7 +126,10 @@ def run_sync_monitor_log_file(args, logfile, cwd=None, env=None,
loop = Mainloop.get(None)
+ proc_estatus = None
def _on_pid_exited(pid, estatus):
+ global proc_estatus
+ proc_estatus = estatus
failed = estatus != 0
warnfilter.finish(not failed)
if fatal_on_error and failed:
@@ -137,4 +140,4 @@ def run_sync_monitor_log_file(args, logfile, cwd=None, env=None,
loop.quit()
loop.watch_pid(proc.pid, _on_pid_exited)
loop.run()
- return proc.returncode
+ return proc_estatus
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]