Skip to content

Commit

Permalink
delayed: handling of lists as result
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Jan 15, 2025
1 parent 3babfe4 commit 3fd516a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pyiron_base/project/delayed.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,13 @@ def draw(self):
def get_python_result(self):
if isinstance(self._result, dict):
return self._result[self._output_key]
elif isinstance(self._result, list):
if self._list_index is not None:
return self._result[self._list_index]
elif self._output_key is not None:
return self._result[int(self._output_key)]
else:
return self._result
else:
return getattr(self._result.output, self._output_key)

Expand Down

0 comments on commit 3fd516a

Please sign in to comment.