diff options
| author | Jan Tuomi <jan.tuomi@eficode.com> | 2018-12-18 19:56:52 +0200 |
|---|---|---|
| committer | Jan Tuomi <jan.tuomi@eficode.com> | 2018-12-18 19:56:52 +0200 |
| commit | 5f0f41f62e5f65e0a5a88a3366946c33e0a2f724 (patch) | |
| tree | 4e52fb33aade645db5c1eb677cafb6714a2ceaf8 | |
| parent | 7faa4e9c858f177f30a88ef21f01c45bbdc1360b (diff) | |
Encode newlines in command output
| -rw-r--r-- | remote-https-runner/runner.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/remote-https-runner/runner.py b/remote-https-runner/runner.py index c550555..2fa03b5 100644 --- a/remote-https-runner/runner.py +++ b/remote-https-runner/runner.py @@ -59,9 +59,10 @@ def key(key): start = time.time() output = subprocess.check_output(cmd, shell=True) end = time.time() + duration = "{:.2f}".format(end - start) output = output.decode("utf-8") if type(output) == bytes else output - duration = "{:.2f}".format(end - start) + output = output.encode("unicode_escape").decode("utf-8") logging.info("Command output:") logging.info(output) |
