From: Frank Brehm Date: Fri, 13 Dec 2019 12:35:02 +0000 (+0100) Subject: Bugfixing X-Git-Tag: 1.4.1~2 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=5eb0c50c57914bd8541920dbdeec5f0a205db1a3;p=pixelpark%2Fcreate-terraform.git Bugfixing --- 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))