Skip to content

Commit 16c6ad3

Browse files
authored
Fix whoami_async call in sync context (#7083)
This fixes a RuntimeWarning in tests/calculations/test_stash.py tests/conftest.py:199: RuntimeWarning: coroutine 'BlockingTransport.whoami_async' was never awaited return process.prepare_for_submission(folder)
1 parent 27b52da commit 16c6ad3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/aiida/calculations/unstash.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def traverse(node_):
109109
else: # UnstashTargetMode.NewRemoteData.value
110110
computer = self.inputs.metadata.get('computer')
111111
with computer.get_transport() as transport:
112-
remote_user = transport.whoami_async()
112+
remote_user = transport.whoami()
113113
remote_working_directory = computer.get_workdir().format(username=remote_user)
114114

115115
# The following line is set at calcjob::presubmit, but we need it here

0 commit comments

Comments
 (0)