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:
parent
31fa527e1b
commit
186d739d7f
@ -538,7 +538,7 @@ def run(args, stdin=None, raiseonerr=True, nolog=(), env=None,
|
||||
logger.debug('Process interrupted')
|
||||
p.wait()
|
||||
raise
|
||||
except:
|
||||
except BaseException:
|
||||
logger.debug('Process execution failed')
|
||||
raise
|
||||
finally:
|
||||
|
@ -216,7 +216,7 @@ class KRAInstaller(KRAInstall):
|
||||
|
||||
try:
|
||||
kra.install(api, config, self.options, custodia=custodia)
|
||||
except:
|
||||
except BaseException:
|
||||
logger.error('%s', dedent(self.FAIL_MESSAGE))
|
||||
raise
|
||||
|
||||
|
@ -159,7 +159,7 @@ def set_service_entry_config(name, fqdn, config_values,
|
||||
"service %s has already enabled config values %s", name,
|
||||
config_values)
|
||||
return
|
||||
except:
|
||||
except BaseException:
|
||||
logger.debug("failed to set service %s config values", name)
|
||||
raise
|
||||
|
||||
@ -699,7 +699,7 @@ class Service:
|
||||
api.Backend.ldap2.update_entry(entry)
|
||||
except errors.EmptyModlist:
|
||||
pass
|
||||
except:
|
||||
except BaseException:
|
||||
logger.debug("failed to disable service %s startup entry", name)
|
||||
raise
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user