From: Frank Brehm Date: Wed, 15 Feb 2023 12:05:47 +0000 (+0100) Subject: Fixing output of lib/dpx_puppettools/app/get_forge_module.py X-Git-Tag: 0.3.0~2^2~17 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=d28d7705c0470d661165242b4352c25164395107;p=pixelpark%2Fpuppet-tools.git Fixing output of lib/dpx_puppettools/app/get_forge_module.py --- diff --git a/lib/dpx_puppettools/app/get_forge_module.py b/lib/dpx_puppettools/app/get_forge_module.py index 7d4b97c..ecaabee 100644 --- a/lib/dpx_puppettools/app/get_forge_module.py +++ b/lib/dpx_puppettools/app/get_forge_module.py @@ -33,7 +33,7 @@ LOG = logging.getLogger(__name__) _ = XLATOR.gettext ngettext = XLATOR.ngettext -__version__ = '0.7.0' +__version__ = '0.7.1' # ============================================================================= @@ -238,7 +238,7 @@ class GetForgeModuleApplication(BaseDPXPuppetApplication): return module_entry = pfile.modules[self.module_name] - if self.verbose > 0: + if self.verbose > 1: msg = _( "Puppetfile entry of module {m!r} not found in Puppetfile of environment " "{e!r}:").format(m=self.module_name, e=env) @@ -281,9 +281,10 @@ class GetForgeModuleApplication(BaseDPXPuppetApplication): if len(env) > max_len_env: max_len_env = len(env) for env in self.mod_env_info.keys(): - msg = ' * {env:<{width}} {info}'.format( - width=(max_len_env + 1), env=(self.colored(env, 'CYAN') + ':'), - info=self.mod_env_info[env]) + diff = max_len_env - len(env) + gap = ' ' * diff + el = self.colored(env, 'CYAN') + ':' + gap + msg = ' * {env} {info}'.format(env=el, info=self.mod_env_info[env]) print(msg) self.empty_line()