Commit 5bb51278 authored by payno's avatar payno
Browse files

[node] fix load_handlers. Load directly the function is contains specific handlers

parent e99104e1
...@@ -117,6 +117,10 @@ class Node(object): ...@@ -117,6 +117,10 @@ class Node(object):
def process_pt(self): def process_pt(self):
return self._process_pt return self._process_pt
@property
def class_instance(self):
return self.__process_instance
def isfinal(self) -> bool: def isfinal(self) -> bool:
""" """
...@@ -176,7 +180,7 @@ class Node(object): ...@@ -176,7 +180,7 @@ class Node(object):
if hasattr(self.__process_instance, 'inputs'): if hasattr(self.__process_instance, 'inputs'):
for input_ in self.__process_instance.inputs: for input_ in self.__process_instance.inputs:
input_name, input_type, input_handler = input_ input_name, input_type, input_handler = input_
self._handlers[input_name] = input_handler self._handlers[input_name] = getattr(self.__process_instance, input_handler)
if len(self._handlers) == 0: if len(self._handlers) == 0:
raise ValueError('Fail to init handlers, none defined for ' + str(self._process_pt)) raise ValueError('Fail to init handlers, none defined for ' + str(self._process_pt))
...@@ -301,4 +305,4 @@ class ErrorHandler(Node): ...@@ -301,4 +305,4 @@ class ErrorHandler(Node):
error_handler=None) error_handler=None)
def _get_error_handler_json(self): def _get_error_handler_json(self):
return {} return {}
\ No newline at end of file
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