summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2018-05-04 11:28:46 +0100
committerAndrew Bartlett <abartlet@samba.org>2018-05-12 21:38:16 +0200
commit7399da0b44503d2b5fe3218f9b55c79eac4cefe4 (patch)
treee0b06ad43abaa0db1a3c068a9b37d8f781538e0d /python
parent63648af515df6c62e44ebeaa81d73e49511d03bc (diff)
downloadsamba-7399da0b44503d2b5fe3218f9b55c79eac4cefe4.tar.gz
samba-7399da0b44503d2b5fe3218f9b55c79eac4cefe4.tar.bz2
samba-7399da0b44503d2b5fe3218f9b55c79eac4cefe4.zip
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 <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
-rw-r--r--python/samba/netcmd/__init__.py2
1 files changed, 1 insertions, 1 deletions
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)