Skip to content

Commit 80cdd41

Browse files
committed
Merge branch 'url_encode_paths_for_s3_download' into 'main'
URL encode paths for S3 download See merge request sanger-pathogens/pipelines/nano-rave!23
2 parents a0e638c + b4e0a13 commit 80cdd41

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/download_test_data.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python3
22

33
import xml.etree.ElementTree as ET
4+
import urllib.parse as urlparse
45
import urllib.request as urlrequest
56
from pathlib import Path
67
import shutil
@@ -57,7 +58,7 @@ def fetch_index(continuation_token = None) -> Tuple[List[str], Optional[Any]]:
5758

5859

5960
def download_file(path: str):
60-
url = BUCKET_URL + "/" + path
61+
url = BUCKET_URL + "/" + urlparse.quote_plus(path)
6162

6263
# Note: '/' operator joins paths
6364
dest = OUTPUT_DIR / path

0 commit comments

Comments
 (0)