mirror of
https://github.com/samba-team/samba.git
synced 2025-08-05 12:22:11 +03:00
s4/scripting/autoidl: py3 compatible except
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <noel.power@suse.com>
This commit is contained in:
committed by
Douglas Bagnall
parent
8532308883
commit
f109fde362
@ -37,8 +37,8 @@ def find_num_funcs(conn):
|
|||||||
for i in xrange(MAX_OPNUM):
|
for i in xrange(MAX_OPNUM):
|
||||||
try:
|
try:
|
||||||
conn.request(i, "")
|
conn.request(i, "")
|
||||||
except RuntimeError, (num, msg):
|
except RuntimeError as e:
|
||||||
if num == DCERPC_FAULT_OP_RNG_ERROR:
|
if e.args[0] == DCERPC_FAULT_OP_RNG_ERROR:
|
||||||
return i
|
return i
|
||||||
raise Exception("More than %d functions" % MAX_OPNUM)
|
raise Exception("More than %d functions" % MAX_OPNUM)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user