mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fix E722 do not use bare 'except'
Related: https://pagure.io/freeipa/issue/8306 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
This commit is contained in:
@@ -268,7 +268,7 @@ class certprofile_import(LDAPCreate):
|
||||
with self.api.Backend.ra_certprofile as profile_api:
|
||||
profile_api.create_profile(context.profile)
|
||||
profile_api.enable_profile(keys[0])
|
||||
except:
|
||||
except BaseException:
|
||||
# something went wrong ; delete entry
|
||||
ldap.delete_entry(dn)
|
||||
raise
|
||||
|
||||
@@ -720,7 +720,7 @@ class stageuser_activate(LDAPQuery):
|
||||
# Now delete the Staging entry
|
||||
try:
|
||||
self._exc_wrapper(args, options, ldap.delete_entry)(staging_dn)
|
||||
except:
|
||||
except BaseException:
|
||||
try:
|
||||
logger.error("Fail to delete the Staging user after "
|
||||
"activating it %s ", staging_dn)
|
||||
|
||||
Reference in New Issue
Block a user