mirror of
https://github.com/samba-team/samba.git
synced 2025-12-17 04:23:50 +03:00
samba-tool: convert 'except X, (tuple)' to 'except X as e'
In addition to converting the except line another line is also added for each except to extract the tuple contents. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Douglas Bagnall
parent
91a5941f17
commit
52729d3549
@@ -202,7 +202,8 @@ class cmd_drs_showrepl(Command):
|
||||
scope=ldb.SCOPE_BASE,
|
||||
attrs=["dnsHostName"])
|
||||
d['dns name'] = c_server_res[0]["dnsHostName"][0]
|
||||
except ldb.LdbError, (errno, _):
|
||||
except ldb.LdbError as e:
|
||||
(errno, _) = e.args
|
||||
if errno == ldb.ERR_NO_SUCH_OBJECT:
|
||||
d['is deleted'] = True
|
||||
except KeyError:
|
||||
|
||||
Reference in New Issue
Block a user