From bcae4c2dbea7067932e931456998b1ada20d615c Mon Sep 17 00:00:00 2001 From: Rob van der Linde Date: Thu, 28 Mar 2024 16:15:06 +1300 Subject: [PATCH] python: lint: fix pylint R1720 unnecessary "raise" after "else" Signed-off-by: Rob van der Linde Reviewed-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- python/samba/netcmd/domain/auth/policy/policy.py | 4 ++-- python/samba/netcmd/domain/auth/silo/silo.py | 4 ++-- python/samba/netcmd/domain/claim/claim_type.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/python/samba/netcmd/domain/auth/policy/policy.py b/python/samba/netcmd/domain/auth/policy/policy.py index 5da74734f9d..207aa33c8d3 100644 --- a/python/samba/netcmd/domain/auth/policy/policy.py +++ b/python/samba/netcmd/domain/auth/policy/policy.py @@ -437,8 +437,8 @@ class cmd_domain_auth_policy_delete(Command): if not force: raise CommandError( f"{e}\nTry --force to delete protected authentication policies.") - else: - raise CommandError(e) + + raise CommandError(e) # Authentication policy deleted successfully. print(f"Deleted authentication policy: {name}", file=self.outf) diff --git a/python/samba/netcmd/domain/auth/silo/silo.py b/python/samba/netcmd/domain/auth/silo/silo.py index 028581a61c7..2963ede64d4 100644 --- a/python/samba/netcmd/domain/auth/silo/silo.py +++ b/python/samba/netcmd/domain/auth/silo/silo.py @@ -378,8 +378,8 @@ class cmd_domain_auth_silo_delete(Command): if not force: raise CommandError( f"{e}\nTry --force to delete protected authentication silos.") - else: - raise CommandError(e) + + raise CommandError(e) # Authentication silo deleted successfully. print(f"Deleted authentication silo: {name}", file=self.outf) diff --git a/python/samba/netcmd/domain/claim/claim_type.py b/python/samba/netcmd/domain/claim/claim_type.py index fffc100e103..3bd91e13a6a 100644 --- a/python/samba/netcmd/domain/claim/claim_type.py +++ b/python/samba/netcmd/domain/claim/claim_type.py @@ -244,8 +244,8 @@ class cmd_domain_claim_claim_type_delete(Command): if not force: raise CommandError( f"{e}\nTry --force to delete protected claim types.") - else: - raise CommandError(e) + + raise CommandError(e) # Claim type deleted successfully. print(f"Deleted claim type: {name}", file=self.outf)