From 1800cd5c5939282d3d03d06ac57c2f2a0bbb0b52 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Fri, 12 Jun 2020 14:00:45 +0200 Subject: [PATCH] Adding debug output --- lib/cr_vmware_tpl/config.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/cr_vmware_tpl/config.py b/lib/cr_vmware_tpl/config.py index 683ae29..b4dea18 100644 --- a/lib/cr_vmware_tpl/config.py +++ b/lib/cr_vmware_tpl/config.py @@ -615,8 +615,12 @@ class CrTplConfiguration(BaseConfiguration): raise ValueError(msg) salt = crypt.mksalt(self.method_list[m]) - LOG.debug("Hashing password {pw!r} with salt {sa!r} (method {me!r})..".format( - pw=self.root_password, sa=salt, me=m)) + if self.verbose > 1: + pw_show = self.root_password + if self.verbose < 4: + pw_show = '********' + LOG.debug("Hashing password {pw!r} with salt {sa!r} (method {me!r})..".format( + pw=pw_show, sa=salt, me=m)) pwd_hash = crypt.crypt(self.root_password, salt) if self.verbose > 2: LOG.debug(_("Hashed root password: {!r}").format(pwd_hash)) -- 2.39.5