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 <cheimes@redhat.com>
This commit is contained in:
Martin Basti 2017-01-13 12:11:19 +01:00
parent cca9aa43e1
commit aa036e5f33

View File

@ -389,8 +389,9 @@ class WSGIExecutioner(Executioner):
) )
# get at least some context of what is going on # get at least some context of what is going on
params = options params = options
error = e
if error: if error:
result_string = type(e).__name__ result_string = type(error).__name__
else: else:
result_string = 'SUCCESS' result_string = 'SUCCESS'
self.info('[%s] %s: %s(%s): %s', self.info('[%s] %s: %s(%s): %s',