summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rpmci/lame_vcs_abstraction.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/rpmci/lame_vcs_abstraction.py b/rpmci/lame_vcs_abstraction.py
index 02c6149..83f1011 100644
--- a/rpmci/lame_vcs_abstraction.py
+++ b/rpmci/lame_vcs_abstraction.py
@@ -77,7 +77,14 @@ class Vcs(object):
def _vcs_exec_sync_log_error(self, args):
logging.info("Synchronously executing: %r in cwd %r" % (args, self._dir))
- return subprocess.check_output(args, stderr=subprocess.STDOUT, close_fds=True, cwd=self._dir)
+ proc = subprocess.Popen(args, stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT,
+ close_fds=True, cwd=self._dir)
+ output, err = proc.communicate()
+ ecode = proc.poll()
+ if ecode:
+ raise subprocess.CalledProcessError(ecode, args, output=output)
+ return output
def _vcs_exec_async(self, args, logfile_path, on_exited):
logging.info("Asynchronously executing: %r in cwd %r" % (args, self._dir))