From f109fde362c81a9e0e248a244a75a9a7dbaa8f43 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Sun, 28 Oct 2018 11:12:20 +1300 Subject: [PATCH] s4/scripting/autoidl: py3 compatible except Signed-off-by: Douglas Bagnall Reviewed-by: Noel Power --- source4/scripting/bin/autoidl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.47.2