From acc3a0e68160e8b37434f8eabf1daacb4802726e Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Tue, 18 Oct 2022 13:47:32 +0200 Subject: [PATCH] Bugfixing --- lib/pp_admintools/app/remove_ldap_user.py | 4 ++-- lib/pp_admintools/app/set_ldap_password.py | 10 +++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/lib/pp_admintools/app/remove_ldap_user.py b/lib/pp_admintools/app/remove_ldap_user.py index 68a1b66..23adbbc 100644 --- a/lib/pp_admintools/app/remove_ldap_user.py +++ b/lib/pp_admintools/app/remove_ldap_user.py @@ -24,7 +24,7 @@ from ..xlate import XLATOR from .ldap import LdapAppError, FatalLDAPError from .ldap import BaseLdapApplication -__version__ = '0.5.4' +__version__ = '0.5.5' LOG = logging.getLogger(__name__) _ = XLATOR.gettext @@ -239,7 +239,7 @@ class RemoveLdapUserApplication(BaseLdapApplication): # ------------------------------------------------------------------------- def request_for_remove(self): - if self.yes or self.quiet: + if self.quiet: return True print() diff --git a/lib/pp_admintools/app/set_ldap_password.py b/lib/pp_admintools/app/set_ldap_password.py index 0b2009a..dec44c2 100644 --- a/lib/pp_admintools/app/set_ldap_password.py +++ b/lib/pp_admintools/app/set_ldap_password.py @@ -36,7 +36,7 @@ from .ldap import LdapAppError, FatalLDAPError from .ldap import BaseLdapApplication from .ldap import PasswordFileOptionAction -__version__ = '0.6.3' +__version__ = '0.6.4' LOG = logging.getLogger(__name__) _ = XLATOR.gettext @@ -581,12 +581,8 @@ class SetLdapPasswordApplication(BaseLdapApplication): print() msg = _("Apply new password? [{yes}/{no}]?").format( yes=self.colored(_('yes'), 'RED'), no=self.colored(_('No'), 'GREEN')) + ' ' - do_set_passwd = False - if self.yes: - do_set_passwd = True - else: - do_set_passwd = self.ask_for_yes_or_no(msg, default_on_empty=False) - print() + do_set_passwd = self.ask_for_yes_or_no(msg, default_on_empty=False) + print() if not do_set_passwd: msg = _("Do not setting password for {!r}.").format(self.user_dn) -- 2.39.5