From: Frank Brehm Date: Tue, 7 Sep 2021 15:13:39 +0000 (+0200) Subject: Fixing output of method verify_vsphere_credentials() X-Git-Tag: 1.5.2^2~5 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=cb8b34bd9341e6cc838bf643c989cd581cfd7c76;p=pixelpark%2Fcreate-terraform.git Fixing output of method verify_vsphere_credentials() --- diff --git a/lib/cr_tf/app.py b/lib/cr_tf/app.py index c4254ba..6548e11 100644 --- a/lib/cr_tf/app.py +++ b/lib/cr_tf/app.py @@ -47,7 +47,7 @@ from .xlate import __base_dir__ as __xlate_base_dir__ from .xlate import __mo_file__ as __xlate_mo_file__ from .xlate import XLATOR, LOCALE_DIR, DOMAIN -__version__ = '1.1.12' +__version__ = '1.2.0' LOG = logging.getLogger(__name__) SIGNAL_NAMES = { @@ -506,10 +506,10 @@ class CrTfApplication(BaseApplication): if not self.handler.vsphere_user: need_nl = True - msg = '\n' + _("Please input the {}:").format(self.colored( + msg = '\n' + _("Please input the {}.").format(self.colored( _('vSphere user name'), 'AQUA')) print(msg) - self.handler.vsphere_user = input(_('Name') + ': ') + self.handler.vsphere_user = input(self.colored(_('Name'), 'AQUA') + ': ') if not self.handler.vsphere_user: msg = _("No {} given.").format(_('vSphere user name')) raise ExpectedHandlerError(msg) @@ -526,9 +526,11 @@ class CrTfApplication(BaseApplication): if need_nl: print('') - prompt = self.colored(_("User password"), 'AQUA') + prompt = self.colored(_("User password of {!r}").format( + self.handler.vsphere_user), 'AQUA') item = _('Password for user {u!r} of vSphere {n} on {h!r}').format( u=self.handler.vsphere_user, n=vname, h=self.config.vsphere[vname].host) + item = self.colored(item, 'AQUA') self.handler.vsphere_password = self.get_secret(prompt=prompt, item_name=item) if not self.handler.vsphere_password: msg = _("No {} given.").format(_('password of vSphere user'))