]> Frank Brehm's Git Trees - pixelpark/create-terraform.git/commitdiff
Bugfixing
authorFrank Brehm <frank.brehm@pixelpark.com>
Fri, 13 Dec 2019 12:35:02 +0000 (13:35 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Fri, 13 Dec 2019 12:35:02 +0000 (13:35 +0100)
lib/cr_tf/handler.py

index 9f217cdecf81f05c9da132be421e8ac2f480d160..36d6f42a4582c492031503ba3c4751add3f3c425 100644 (file)
@@ -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))