Update Python runner to log an error if it fails to de-serialize the
action result (e.g. due to non-simple type in the result or similar).
@@ -178,8 +178,10 @@ class PythonRunner(ActionRunner):
# Parse the serialized action result object
try:
action_result = json.loads(action_result)
- except:
- pass
+ except Exception as e:
+ # Failed to de-serialize the result, probably it contains non-simple type or similar
+ # TODO: Should we throw instead?
+ LOG.warning('Failed to de-serialize result "%s": %s' % (str(action_result), str(e)))
if action_result and isinstance(action_result, dict):
result = action_result.get('result', None)
