From: Joseph Sutton Date: Tue, 4 Apr 2023 04:39:23 +0000 (+1200) Subject: samba-tool domain: Use result of setup_local_server() instead of object field X-Git-Tag: talloc-2.4.1~696 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a2b187819fdf2f2500a356d9746149ebaddd0cf;p=thirdparty%2Fsamba.git samba-tool domain: Use result of setup_local_server() instead of object field The code is clearer if we consistently refer to the same variables. Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/netcmd/domain/trust.py b/python/samba/netcmd/domain/trust.py index 299f9329ae1..d20ccee0b5b 100644 --- a/python/samba/netcmd/domain/trust.py +++ b/python/samba/netcmd/domain/trust.py @@ -462,7 +462,7 @@ class cmd_domain_trust_list(DomainTrustCommand): if self.check_runtime_error(error, werror.WERR_RPC_S_PROCNUM_OUT_OF_RANGE): # TODO: we could implement a fallback to lsa.EnumTrustDom() raise CommandError("LOCAL_DC[%s]: netr_DsrEnumerateDomainTrusts not supported." % ( - self.local_server)) + local_server)) raise self.LocalRuntimeError(self, error, "netr_DsrEnumerateDomainTrusts failed") a = local_netlogon_trusts.array @@ -1878,15 +1878,15 @@ class cmd_domain_trust_namespaces(DomainTrustCommand): except RuntimeError as error: if self.check_runtime_error(error, werror.WERR_RPC_S_PROCNUM_OUT_OF_RANGE): raise CommandError("LOCAL_DC[%s]: netr_DsRGetForestTrustInformation() not supported." % ( - self.local_server)) + local_server)) if self.check_runtime_error(error, werror.WERR_INVALID_FUNCTION): raise CommandError("LOCAL_DC[%s]: netr_DsRGetForestTrustInformation() not supported." % ( - self.local_server)) + local_server)) if self.check_runtime_error(error, werror.WERR_NERR_ACFNOTLOADED): raise CommandError("LOCAL_DC[%s]: netr_DsRGetForestTrustInformation() not supported." % ( - self.local_server)) + local_server)) raise self.LocalRuntimeError(self, error, "netr_DsRGetForestTrustInformation() failed")