From: Douglas Bagnall Date: Sat, 27 Oct 2018 22:12:20 +0000 (+1300) Subject: s4/scripting/autoidl: py3 compatible except X-Git-Tag: tdb-1.3.17~1043 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f109fde362c81a9e0e248a244a75a9a7dbaa8f43;p=thirdparty%2Fsamba.git s4/scripting/autoidl: py3 compatible except Signed-off-by: Douglas Bagnall Reviewed-by: Noel Power --- diff --git a/source4/scripting/bin/autoidl b/source4/scripting/bin/autoidl index 6a13caa2510..317749c75a0 100755 --- a/source4/scripting/bin/autoidl +++ b/source4/scripting/bin/autoidl @@ -37,8 +37,8 @@ def find_num_funcs(conn): for i in xrange(MAX_OPNUM): try: conn.request(i, "") - except RuntimeError, (num, msg): - if num == DCERPC_FAULT_OP_RNG_ERROR: + except RuntimeError as e: + if e.args[0] == DCERPC_FAULT_OP_RNG_ERROR: return i raise Exception("More than %d functions" % MAX_OPNUM)