Skip to content

Commit ab17eab

Browse files
committed
get_item()
1 parent fa500fd commit ab17eab

File tree

1 file changed

+5
-1
lines changed
  • python_workflow_definition/src/python_workflow_definition

1 file changed

+5
-1
lines changed

python_workflow_definition/src/python_workflow_definition/executorlib.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
from python_workflow_definition.purepython import resort_total_lst, group_edges
88

99

10+
def get_item(obj, key):
11+
return obj[key]
12+
13+
1014
def _get_value(result_dict, nodes_new_dict, link_dict, exe):
1115
source, source_handle = link_dict["source"], link_dict["sourceHandle"]
1216
if source in result_dict.keys():
@@ -18,7 +22,7 @@ def _get_value(result_dict, nodes_new_dict, link_dict, exe):
1822
if source_handle is None:
1923
return result
2024
else:
21-
return exe.submit(fn=getattr, object=result, name=source_handle)
25+
return exe.submit(fn=get_item, obj=result, key=source_handle)
2226

2327

2428
def load_workflow_json(file_name, exe):

0 commit comments

Comments
 (0)