From: Douglas Bagnall Date: Fri, 19 Aug 2022 05:06:48 +0000 (+1200) Subject: samba-tool: avoid traceback for NT_STATUS_NETWORK_UNREACHABLE X-Git-Tag: talloc-2.4.0~1180 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=90780936202c3233e33fc6e2a8fac53680cdf63b;p=thirdparty%2Fsamba.git samba-tool: avoid traceback for NT_STATUS_NETWORK_UNREACHABLE Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- 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):