From: Rob van der Linde Date: Thu, 28 Mar 2024 03:15:06 +0000 (+1300) Subject: python: lint: fix pylint R1720 unnecessary "raise" after "else" X-Git-Tag: tdb-1.4.11~1269 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcae4c2dbea7067932e931456998b1ada20d615c;p=thirdparty%2Fsamba.git python: lint: fix pylint R1720 unnecessary "raise" after "else" Signed-off-by: Rob van der Linde Reviewed-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- 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)