Skip to content

Commit

Permalink
RF: Use as_posix() and f-strings to construct URL
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies authored Oct 12, 2023
1 parent 114183c commit 9ef952b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templateflow/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ def _s3_get(filepath):
from tqdm import tqdm
import requests

path = str(filepath.relative_to(TF_LAYOUT.root))
url = "%s/%s" % (TF_S3_ROOT, path.replace("\\", "/"))
path = filepath.relative_to(TF_LAYOUT.root).as_posix()
url = f"{TF_S3_ROOT}/{path}"

print("Downloading %s" % url, file=stderr)
# Streaming, so we can iterate over the response.
Expand Down

0 comments on commit 9ef952b

Please sign in to comment.