From: Noel Power Date: Fri, 4 May 2018 10:28:46 +0000 (+0100) Subject: samba_tool: Py2/Py3 compatability fix tuple assigment X-Git-Tag: ldb-1.4.0~261 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7399da0b44503d2b5fe3218f9b55c79eac4cefe4;p=thirdparty%2Fsamba.git 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 --- diff --git a/python/samba/netcmd/__init__.py b/python/samba/netcmd/__init__.py index 77976780150..9df096d5bd3 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)