From: Frank Brehm Date: Fri, 12 Jun 2020 12:00:45 +0000 (+0200) Subject: Adding debug output X-Git-Tag: 2.1.2^2~9^2~31^2~46 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=1800cd5c5939282d3d03d06ac57c2f2a0bbb0b52;p=pixelpark%2Fcreate-vmware-tpl.git Adding debug output --- 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))