Skip to content

Commit

Permalink
fix: Don't change after_execute
Browse files Browse the repository at this point in the history
  • Loading branch information
mkundu1 committed Oct 1, 2024
1 parent 0df763a commit 11a3319
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/ansys/fluent/core/services/datamodel_se.py
Original file line number Diff line number Diff line change
Expand Up @@ -1743,7 +1743,7 @@ def before_execute(self, value):
def after_execute(self, value):
"""Executes after command execution."""
if hasattr(self, "_do_after_execute"):
return self._do_after_execute(value)
self._do_after_execute(value)

def __call__(self, *args, **kwds) -> Any:
"""Execute the command.
Expand Down Expand Up @@ -1836,14 +1836,9 @@ def _do_before_execute(self, value):
class _OutputFile:
def _do_after_execute(self, value):
try:
file_names = value if isinstance(value, list) else [value]
base_names = []
for file_name in file_names:
self.service.file_transfer_service.download(file_name=value)
base_names.append(os.path.basename(file_name))
return base_names if isinstance(value, list) else base_names[0]
self.service.file_transfer_service.download(file_name=value)
except AttributeError:
return value
pass


class _InOutFile(_InputFile, _OutputFile):
Expand Down

0 comments on commit 11a3319

Please sign in to comment.