From 7399da0b44503d2b5fe3218f9b55c79eac4cefe4 Mon Sep 17 00:00:00 2001 From: Noel Power Date: Fri, 4 May 2018 11:28:46 +0100 Subject: [PATCH] samba_tool: Py2/Py3 compatability fix tuple assigment replace (foo, bar) = e with (foo, bar) = e.args while will run in with both python2 and python3 Signed-off-by: Noel Power Reviewed-by: Andrew Bartlett --- python/samba/netcmd/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/samba/netcmd/__init__.py b/python/samba/netcmd/__init__.py index 77976780150b..9df096d5bd3e 100644 --- a/python/samba/netcmd/__init__.py +++ b/python/samba/netcmd/__init__.py @@ -103,7 +103,7 @@ class Command(object): force_traceback = True if isinstance(inner_exception, LdbError): - (ldb_ecode, ldb_emsg) = inner_exception + (ldb_ecode, ldb_emsg) = inner_exception.args self.errf.write("ERROR(ldb): %s - %s\n" % (message, ldb_emsg)) elif isinstance(inner_exception, AssertionError): self.errf.write("ERROR(assert): %s\n" % message) -- 2.34.1