from .xlate import XLATOR
-__version__ = '3.3.2'
+__version__ = '3.3.3'
LOG = logging.getLogger(__name__)
_ = XLATOR.gettext
result = self.run(
cmd, may_simulate=True, timeout=tf_timeout, stdout=PIPE, stderr=PIPE, check=True)
except CalledProcessError as e:
- msg = _("Error on executing {cmd!r}: return value {v}.").format(
- cmd=e.cmd, v=e.returncode)
if e.stdout:
- msg += '\nOutput: {}'.format(e.stdout)
+ print(self.colored("Output", 'AQUA') + ':\n' + to_str(e.stdout))
if e.stderr:
- msg += '\nError message: {}'.format(e.stderr)
- raise ExpectedHandlerError(msg)
+ print(self.colored("Error message", ('BOLD', 'RED') + ':\n' + to_str(e.stderr))
+ raise ExpectedHandlerError(str(e))
LOG.debug(_("Completed process:") + "\n" + str(result))
if self.existing_vms:
cmd, may_simulate=True, timeout=tf_timeout,
stdout=PIPE, stderr=PIPE, check=True)
except CalledProcessError as e:
-# 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' + to_str(e.stdout))
if e.stderr:
result = self.run(
cmd, may_simulate=True, timeout=tf_timeout, stdout=PIPE, stderr=PIPE, check=True)
except CalledProcessError as e:
- msg = _("Error on executing {cmd!r}: return value {v}.").format(
- cmd=e.cmd, v=e.returncode)
if e.stdout:
- msg += '\nOutput: {}'.format(e.stdout)
+ print(self.colored("Output", 'AQUA') + ':\n' + to_str(e.stdout))
if e.stderr:
- msg += '\nError message: {}'.format(e.stderr)
- raise ExpectedHandlerError(msg)
+ print(self.colored("Error message", ('BOLD', 'RED') + ':\n' + to_str(e.stderr))
+ raise ExpectedHandlerError(str(e))
LOG.debug(_("Completed process:") + "\n" + str(result))
goto = Path(os.path.relpath(self.project_dir, self.start_dir))