From 5eb0c50c57914bd8541920dbdeec5f0a205db1a3 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Fri, 13 Dec 2019 13:35:02 +0100 Subject: [PATCH] Bugfixing --- lib/cr_tf/handler.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/cr_tf/handler.py b/lib/cr_tf/handler.py index 9f217cd..36d6f42 100644 --- a/lib/cr_tf/handler.py +++ b/lib/cr_tf/handler.py @@ -34,7 +34,7 @@ import yaml import six # Own modules -from fb_tools.common import pp, to_bool, RE_DOT_AT_END +from fb_tools.common import pp, to_bool, to_str, RE_DOT_AT_END from fb_tools.errors import HandlerError, ExpectedHandlerError, CommandNotFoundError @@ -60,7 +60,7 @@ from .terraform.disk import TerraformDisk from .xlate import XLATOR -__version__ = '3.3.1' +__version__ = '3.3.2' LOG = logging.getLogger(__name__) _ = XLATOR.gettext @@ -2837,9 +2837,11 @@ class CreateTerraformHandler(BaseHandler): # msg = _("Error on executing {cmd!r}: return value {v}.").format( # cmd=e.cmd, v=e.returncode) if e.stdout: - print(self.colored("Output", 'AQUA') + ':\n' + e.stdout) + print(self.colored("Output", 'AQUA') + ':\n' + to_str(e.stdout)) if e.stderr: - print(self.colored("Error message", ('BOLD', 'RED')) + ':\n' + e.stderr) + msg = self.colored("Error message", ('BOLD', 'RED')) + ':\n' + msg += to_str(e.stderr) + print(msg) raise ExpectedHandlerError(str(e)) LOG.debug(_("Completed process:") + "\n" + str(result)) -- 2.39.5