Commit a1257e52 authored by payno's avatar payno
Browse files

[PythonActor] simplify overwriting in_data

parent 9054ef4d
...@@ -211,14 +211,12 @@ class PythonActor(AbstractActor): ...@@ -211,14 +211,12 @@ class PythonActor(AbstractActor):
:param data: input data :param data: input data
""" """
channel, in_data = in_data channel, in_data = in_data
logging.info(' on trigger channel is', channel) logging.info('On trigger channel is ' + str(channel))
# cast data to dict if necessary # cast data to dict if necessary
if hasattr(in_data, 'to_dict'): if hasattr(in_data, 'to_dict'):
_in_data = in_data.to_dict() in_data = in_data.to_dict()
else:
_in_data = in_data
self.in_data = _in_data self.in_data = in_data
logger.debug('In trigger {0}, inData = {1}'.format(self.name, pprint.pformat(in_data))) logger.debug('In trigger {0}, inData = {1}'.format(self.name, pprint.pformat(in_data)))
if isinstance(in_data, WorkflowException): if isinstance(in_data, WorkflowException):
logger.error('Error from previous actor! Not running actor {0}'.format(self.name)) logger.error('Error from previous actor! Not running actor {0}'.format(self.name))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment