]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
samba-tool domain: Use result of setup_local_server() instead of object field
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Tue, 4 Apr 2023 04:39:23 +0000 (16:39 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 16 May 2023 23:29:32 +0000 (23:29 +0000)
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>
python/samba/netcmd/domain/trust.py

index 299f9329ae1c27f4dac9a5ac3dd814e723f5aee5..d20ccee0b5b4bebbf64ee4eeeae7982c08275780 100644 (file)
@@ -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")