summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalph Bean <rbean@redhat.com>2017-08-27 20:10:17 +0000
committerRalph Bean <rbean@redhat.com>2017-08-27 20:10:17 +0000
commitcadad801c7fbfda86561607b32b2632519cec722 (patch)
treedc30979ce57539ad3f3250f99d0a02edbcea8d15
parentc5d3ca4bfdb96a9570e140995b5ba238af6cc020 (diff)
downloadansible-cadad801c7fbfda86561607b32b2632519cec722.tar.gz
ansible-cadad801c7fbfda86561607b32b2632519cec722.tar.xz
ansible-cadad801c7fbfda86561607b32b2632519cec722.zip
Wait for subprocesses to finish and traceback on failure for visibility.
-rw-r--r--roles/bodhi2/backend/files/koji-sync-listener.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/roles/bodhi2/backend/files/koji-sync-listener.py b/roles/bodhi2/backend/files/koji-sync-listener.py
index 5adb7f6a9..dc4381e7c 100644
--- a/roles/bodhi2/backend/files/koji-sync-listener.py
+++ b/roles/bodhi2/backend/files/koji-sync-listener.py
@@ -27,7 +27,10 @@ def handle(content):
'--verbose',
] + taglist.split()
print("Running %r" % cmd)
- sp.Popen(cmd)
+ proc = sp.Popen(cmd)
+ status = proc.wait()
+ if status:
+ raise RuntimeError("%r gave return code %r" % (cmd, status))
def main(fullname, fields, content):