From 966bf30bee48646687a12597fbb67273303f3d8f Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Wed, 20 Sep 2017 21:53:05 +0200 Subject: [PATCH] Fix \n thing. --- cdist/exec/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cdist/exec/util.py b/cdist/exec/util.py index 16b685cf..e3c090cc 100644 --- a/cdist/exec/util.py +++ b/cdist/exec/util.py @@ -134,13 +134,13 @@ def handle_called_process_error(err, command): # "stderr: {}").format( # err.returncode, err.output, errout)) if err.output: - output = err.output + '\n' + output = err.output else: output = '' raise cdist.Error(("Command failed: '{}'\n" "return code: {}\n" "---- BEGIN stdout ----\n" - "{}" + "{}" + ("\n" if output else "") + "---- END stdout ----").format( " ".join(command), err.returncode, output))