From 4418e0765a009f081c3840741046147ea1ead05c Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sat, 18 Dec 2010 16:07:05 +0100 Subject: [PATCH] [molecule*] beautify output, make molecule.settings contain only utf strings --- molecule/specs/plugins/builtin_plugin.py | 16 ++++++++-------- molecule/specs/plugins/image_plugin.py | 10 +++++----- molecule/specs/plugins/remaster_plugin.py | 4 ++-- molecule/specs/plugins/tar_plugin.py | 4 ++-- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/molecule/specs/plugins/builtin_plugin.py b/molecule/specs/plugins/builtin_plugin.py index 757b2ec..013018f 100644 --- a/molecule/specs/plugins/builtin_plugin.py +++ b/molecule/specs/plugins/builtin_plugin.py @@ -49,7 +49,7 @@ class BuiltinHandlerMixin: env['CDROOT_DIR'] = cdroot_dir self._output.output("[%s|%s] %s: %s" % ( blue("BuiltinHandler"), darkred(self.spec_name), - _("spawning"), error_script, + _("spawning"), " ".join(error_script), ) ) molecule.utils.exec_cmd(error_script, env = env) @@ -162,7 +162,7 @@ class MirrorHandler(GenericExecutionStep, BuiltinHandlerMixin): args.extend([self.source_dir+"/*", self.dest_dir]) self._output.output("[%s|%s] %s: %s" % ( blue("MirrorHandler"), darkred(self.spec_name), - _("spawning"), args, + _("spawning"), " ".join(args), ) ) rc = molecule.utils.exec_cmd(args) @@ -208,7 +208,7 @@ class ChrootHandler(GenericExecutionStep, BuiltinHandlerMixin): env['CHROOT_DIR'] = self.source_dir self._output.output("[%s|%s] %s: %s" % ( blue("ChrootHandler"), darkred(self.spec_name), - _("spawning"), exec_script, + _("spawning"), " ".join(exec_script), ) ) rc = molecule.utils.exec_cmd(exec_script, env = env) @@ -307,7 +307,7 @@ class ChrootHandler(GenericExecutionStep, BuiltinHandlerMixin): env['CHROOT_DIR'] = self.source_dir self._output.output("[%s|%s] %s: %s" % ( blue("ChrootHandler"), darkred(self.spec_name), - _("spawning"), exec_script, + _("spawning"), " ".join(exec_script), ) ) rc = molecule.utils.exec_cmd(exec_script, env = env) @@ -425,7 +425,7 @@ class CdrootHandler(GenericExecutionStep, BuiltinHandlerMixin): args.extend(self.metadata.get('extra_mksquashfs_parameters', [])) self._output.output("[%s|%s] %s: %s" % ( blue("CdrootHandler"), darkred(self.spec_name), - _("spawning"), args, + _("spawning"), " ".join(args), ) ) rc = molecule.utils.exec_cmd(args) @@ -534,7 +534,7 @@ class IsoHandler(GenericExecutionStep, BuiltinHandlerMixin): env['ISO_CHECKSUM_PATH'] = self.dest_iso + IsoHandler.MD5_EXT self._output.output("[%s|%s] %s: %s" % ( blue("IsoHandler"), darkred(self.spec_name), - _("spawning"), exec_script, + _("spawning"), " ".join(exec_script), ) ) rc = molecule.utils.exec_cmd(exec_script, env = env) @@ -563,7 +563,7 @@ class IsoHandler(GenericExecutionStep, BuiltinHandlerMixin): env['ISO_CHECKSUM_PATH'] = self.dest_iso + IsoHandler.MD5_EXT self._output.output("[%s|%s] %s: %s" % ( blue("IsoHandler"), darkred(self.spec_name), - _("spawning"), exec_script, + _("spawning"), " ".join(exec_script), ) ) rc = molecule.utils.exec_cmd(exec_script, env = env) @@ -604,7 +604,7 @@ class IsoHandler(GenericExecutionStep, BuiltinHandlerMixin): args.extend(['-o', self.dest_iso, self.source_path]) self._output.output("[%s|%s] %s: %s" % ( blue("IsoHandler"), darkred(self.spec_name), - _("spawning"), args, + _("spawning"), " ".join(args), ) ) rc = molecule.utils.exec_cmd(args) diff --git a/molecule/specs/plugins/image_plugin.py b/molecule/specs/plugins/image_plugin.py index fa5ff34..d572f06 100644 --- a/molecule/specs/plugins/image_plugin.py +++ b/molecule/specs/plugins/image_plugin.py @@ -118,7 +118,7 @@ class ImageHandler(GenericExecutionStep, BuiltinHandlerMixin): env['LOOP_DEVICE'] = self.loop_device self._output.output("[%s|%s] %s: %s" % ( blue("ImageHandler"), darkred(self.spec_name), - _("spawning"), exec_script, + _("spawning"), " ".join(exec_script), ) ) rc = molecule.utils.exec_cmd(exec_script, env = env) @@ -179,7 +179,7 @@ class ImageHandler(GenericExecutionStep, BuiltinHandlerMixin): args = [ImageHandler.LOSETUP_EXEC, "-c", self.loop_device] self._output.output("[%s|%s] %s: %s" % ( blue("ImageHandler"), darkred(self.spec_name), - _("spawning"), args, + _("spawning"), " ".join(args), ) ) rc = molecule.utils.exec_cmd(args) @@ -217,7 +217,7 @@ class ImageHandler(GenericExecutionStep, BuiltinHandlerMixin): formatter_args = image_formatter + [self.loop_device] self._output.output("[%s|%s] %s: %s" % ( blue("ImageHandler"), darkred(self.spec_name), - _("spawning"), formatter_args, + _("spawning"), " ".join(formatter_args), ) ) rc = molecule.utils.exec_cmd(formatter_args) @@ -235,7 +235,7 @@ class ImageHandler(GenericExecutionStep, BuiltinHandlerMixin): mount_args = mounter + [self.loop_device, self.tmp_image_mount] self._output.output("[%s|%s] %s: %s" % ( blue("ImageHandler"), darkred(self.spec_name), - _("spawning"), mount_args, + _("spawning"), " ".join(mount_args), ) ) rc = molecule.utils.exec_cmd(mount_args) @@ -469,7 +469,7 @@ class FinalImageHandler(GenericExecutionStep, BuiltinHandlerMixin): FinalImageHandler.MD5_EXT self._output.output("[%s|%s] %s: %s" % ( blue("FinalImageHandler"), darkred(self.spec_name), - _("spawning"), exec_script, + _("spawning"), " ".join(exec_script), ) ) rc = molecule.utils.exec_cmd(exec_script, env = env) diff --git a/molecule/specs/plugins/remaster_plugin.py b/molecule/specs/plugins/remaster_plugin.py index 2151728..da8e909 100644 --- a/molecule/specs/plugins/remaster_plugin.py +++ b/molecule/specs/plugins/remaster_plugin.py @@ -80,7 +80,7 @@ class IsoUnpackHandler(GenericExecutionStep, BuiltinHandlerMixin): mount_args = mounter + [self.iso_image, self.tmp_mount] self._output.output("[%s|%s] %s: %s" % ( blue("IsoUnpackHandler"), darkred(self.spec_name), - _("spawning"), mount_args, + _("spawning"), " ".join(mount_args), ) ) rc = molecule.utils.exec_cmd(mount_args) @@ -109,7 +109,7 @@ class IsoUnpackHandler(GenericExecutionStep, BuiltinHandlerMixin): mount_args = mounter + [squash_file, self.tmp_squash_mount] self._output.output("[%s|%s] %s: %s" % ( blue("IsoUnpackHandler"), darkred(self.spec_name), - _("spawning"), mount_args, + _("spawning"), " ".join(mount_args), ) ) rc = molecule.utils.exec_cmd(mount_args) diff --git a/molecule/specs/plugins/tar_plugin.py b/molecule/specs/plugins/tar_plugin.py index ffac9b6..64e97be 100644 --- a/molecule/specs/plugins/tar_plugin.py +++ b/molecule/specs/plugins/tar_plugin.py @@ -72,7 +72,7 @@ class TarHandler(GenericExecutionStep, BuiltinHandlerMixin): TarHandler.MD5_EXT self._output.output("[%s|%s] %s: %s" % ( blue("TarHandler"), darkred(self.spec_name), - _("spawning"), exec_script, + _("spawning"), " ".join(exec_script), ) ) rc = molecule.utils.exec_cmd(exec_script, env = env) @@ -143,7 +143,7 @@ class TarHandler(GenericExecutionStep, BuiltinHandlerMixin): TarHandler.MD5_EXT self._output.output("[%s|%s] %s: %s" % ( blue("TarHandler"), darkred(self.spec_name), - _("spawning"), exec_script, + _("spawning"), " ".join(exec_script), ) ) rc = molecule.utils.exec_cmd(exec_script, env = env)