diff options
author | Ralph Bean <rbean@redhat.com> | 2017-08-27 20:10:17 +0000 |
---|---|---|
committer | Ralph Bean <rbean@redhat.com> | 2017-08-27 20:10:17 +0000 |
commit | cadad801c7fbfda86561607b32b2632519cec722 (patch) | |
tree | dc30979ce57539ad3f3250f99d0a02edbcea8d15 | |
parent | c5d3ca4bfdb96a9570e140995b5ba238af6cc020 (diff) | |
download | ansible-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.py | 5 |
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): |