1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

samba-tool: Don't try to delete local_tdo_handle twice.

This code is unreachable, as local_tdo_handle has already been deleted
and set to None earlier.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Joseph Sutton 2022-05-05 21:16:17 +12:00 committed by Andreas Schneider
parent ed9d415c08
commit b481ceaa0d

View File

@ -2920,14 +2920,6 @@ class cmd_domain_trust_delete(DomainTrustCommand):
except RuntimeError as error:
self.outf.write("%s\n" % self.RemoteRuntimeError(self, error, "DeleteObject() failed"))
if local_tdo_handle is not None:
try:
local_lsa.DeleteObject(local_tdo_handle)
local_tdo_handle = None
self.outf.write("LocalTDO deleted.\n")
except RuntimeError as error:
self.outf.write("%s\n" % self.LocalRuntimeError(self, error, "DeleteObject() failed"))
return