Update remote.py according to new exec_util api.

remotes/origin/4.2
Darko Poljak 9 years ago
parent ca4cb07b16
commit f6ea90c3a5
  1. 9
      cdist/exec/remote.py

@ -168,14 +168,13 @@ class Remote(object):
self.log.debug("Remote run: %s", command)
try:
output = exec_util.call_get_output(command, env=os_environ)
self.log.debug("Remote output: {}".format(output))
output, errout = exec_util.call_get_output(command, env=os_environ)
self.log.debug("Remote stdout: {}".format(output))
self.log.debug("Remote stderr: {}".format(errout))
if return_output:
return output.decode()
except subprocess.CalledProcessError as e:
raise cdist.Error("Command failed: " + " ".join(command)
+ " with returncode: {} and output: {}".format(
e.returncode, e.output))
exec_util.handle_called_process_error(e, command)
except OSError as error:
raise cdist.Error(" ".join(command) + ": " + error.args[1])
except UnicodeDecodeError:

Loading…
Cancel
Save