From 90780936202c3233e33fc6e2a8fac53680cdf63b Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Fri, 19 Aug 2022 17:06:48 +1200 Subject: [PATCH] samba-tool: avoid traceback for NT_STATUS_NETWORK_UNREACHABLE Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- python/samba/netcmd/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/samba/netcmd/__init__.py b/python/samba/netcmd/__init__.py index b98f8a47fd0..0cb2ee43765 100644 --- a/python/samba/netcmd/__init__.py +++ b/python/samba/netcmd/__init__.py @@ -120,6 +120,9 @@ class Command(object): if ldb_ecode == ERR_INVALID_CREDENTIALS: print("Invalid username or password", file=self.errf) force_traceback = False + elif ldb_emsg == 'LDAP client internal error: NT_STATUS_NETWORK_UNREACHABLE': + print("Could not reach remote server", file=self.errf) + force_traceback = False else: self.errf.write("ERROR(ldb): %s - %s\n" % (message, ldb_emsg)) elif isinstance(inner_exception, AssertionError): -- 2.47.3