summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJoseph Sutton <josephsutton@catalyst.net.nz>2023-04-04 16:39:23 +1200
committerAndrew Bartlett <abartlet@samba.org>2023-05-16 23:29:32 +0000
commit5a2b187819fdf2f2500a356d9746149ebaddd0cf (patch)
treef689fe2bb632c0c3d262ac220737d7c0df6374f4 /python
parent3eb95c8791a069bb280c9ae588b7c5ea74abbf36 (diff)
downloadsamba-5a2b187819fdf2f2500a356d9746149ebaddd0cf.tar.gz
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 <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
-rw-r--r--python/samba/netcmd/domain/trust.py8
1 files changed, 4 insertions, 4 deletions
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")