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:
Christian Heimes
2020-04-30 15:17:52 +02:00
parent 31fa527e1b
commit 186d739d7f
5 changed files with 6 additions and 6 deletions

View File

@@ -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

View File

@@ -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)