From aa036e5f332ef0b1ebbff6b824e236b1eeaf076e Mon Sep 17 00:00:00 2001 From: Martin Basti Date: Fri, 13 Jan 2017 12:11:19 +0100 Subject: [PATCH] py3: rpcserver fix undefined variable variable 'e' is valid only in except block in py3, so it must be assigned to different variable for further usage https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Christian Heimes --- ipaserver/rpcserver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ipaserver/rpcserver.py b/ipaserver/rpcserver.py index 8a18f9466..45550fb1f 100644 --- a/ipaserver/rpcserver.py +++ b/ipaserver/rpcserver.py @@ -389,8 +389,9 @@ class WSGIExecutioner(Executioner): ) # get at least some context of what is going on params = options + error = e if error: - result_string = type(e).__name__ + result_string = type(error).__name__ else: result_string = 'SUCCESS' self.info('[%s] %s: %s(%s): %s',