mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
actions: Fix log message when action return can't be decoded
return_value is not available during exception handling. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
15b537ccb7
commit
1274ffdf87
@ -134,9 +134,8 @@ def _wait_for_return(module_name, action_name, args, kwargs, log_error, proc,
|
|||||||
try:
|
try:
|
||||||
return_value = json.loads(b''.join(buffers))
|
return_value = json.loads(b''.join(buffers))
|
||||||
except json.JSONDecodeError:
|
except json.JSONDecodeError:
|
||||||
logger.error(
|
logger.error('Error decoding action return value %s..%s(*%s, **%s)',
|
||||||
'Error decoding action return value %s..%s(*%s, **%s): %s',
|
module_name, action_name, args, kwargs)
|
||||||
module_name, action_name, args, kwargs, return_value)
|
|
||||||
raise
|
raise
|
||||||
|
|
||||||
if return_value['result'] == 'success':
|
if return_value['result'] == 'success':
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user