Skip to content

Commit

Permalink
fix ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
floriankrb committed Nov 15, 2024
1 parent 116b3da commit 257a776
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/anemoi/utils/remote/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ def _parse_target(self, target):

def get_temporary_target(self, target, pattern):
hostname, path = self._parse_target(target)
dirname, basename = os.path.split(path)
path = pattern.format(dirname=dirname, basename=basename)
if pattern is not None:
dirname, basename = os.path.split(path)
path = pattern.format(dirname=dirname, basename=basename)
return f"ssh://{hostname}:{path}"

def rename_target(self, target, new_target):
Expand Down

0 comments on commit 257a776

Please sign in to comment.