Skip to content

Commit 29062ad

Browse files
committed
Fix usage of RemoteData in arguments
The tests did not cover the usage of `RemoteData` in the arguments which did not cover the bug that `self.handle_remote_data` does not exist. We translate the node by passing the path to the arguments.
1 parent 189df63 commit 29062ad

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/aiida_shell/calculations/shell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ def process_arguments_and_nodes(
407407
self.write_folder_data(node, dirpath, filename)
408408
argument_interpolated = argument.format(**{placeholder: filename or placeholder})
409409
elif isinstance(node, RemoteData):
410-
self.handle_remote_data(node)
410+
argument_interpolated = argument.format(**{placeholder: node.get_remote_path()})
411411
else:
412412
argument_interpolated = argument.format(**{placeholder: str(node.value)})
413413

tests/test_launch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def test_nodes_remote_data(tmp_path, aiida_localhost, use_symlinks):
144144

145145
results, node = launch_shell_job(
146146
'unzip',
147-
arguments=['archive.zip'],
147+
arguments=['{archive}'],
148148
nodes={'remote': remote_data},
149149
outputs=['file_a.txt'],
150150
metadata={

0 commit comments

Comments
 (0)