From f580c8b0427d5aa4f63b5c6704d9c7819a0c61c4 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Thu, 1 Sep 2022 01:16:53 +0000 Subject: [PATCH] samba-tool: do not force a traceback on CommandError When a CommandError has an 'inner exception', we have been printing drowning out the error message with a long traceback of the exception we tried to catch. People who really want to see tracebacks can use -d3. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- python/samba/netcmd/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/python/samba/netcmd/__init__.py b/python/samba/netcmd/__init__.py index 0cb2ee43765..73292489268 100644 --- a/python/samba/netcmd/__init__.py +++ b/python/samba/netcmd/__init__.py @@ -137,7 +137,6 @@ class Command(object): self.errf.write("ERROR: %s\n" % (message)) else: self.errf.write("ERROR(%s): %s - %s\n" % (str(etype), message, evalue)) - force_traceback = True if force_traceback or samba.get_debug_level() >= 3: traceback.print_tb(etraceback, file=self.errf) -- 2.47.3