mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-30 05:30:28 +08:00
builder/utils/execute_cmd: remove useless return value and add a test
Since we never pass in subprocess.PIPE for stdin/stdout/stderr, subprocess.communicate() does nothing, and the return out/err tuple was always empty.
This commit is contained in:
@@ -44,12 +44,11 @@ def execute_cmd(args, output=None, cwd=None):
|
||||
|
||||
log.info("Executing the command \"%s\"%s" % (" ".join(args), out_log_msg))
|
||||
proc = subprocess.Popen(args, stdout=output, stderr=output, cwd=cwd)
|
||||
out, err = proc.communicate()
|
||||
proc.wait()
|
||||
|
||||
if proc.returncode != 0:
|
||||
err_msg = "Command '%s' returned non-zero value %d%s" % (args, proc.returncode, out_log_msg)
|
||||
raise RuntimeError(err_msg)
|
||||
return out, err
|
||||
|
||||
|
||||
def get_koji_config(mbs_config):
|
||||
|
||||
Reference in New Issue
Block a user