Skip to content

Commit

Permalink
Merge branch 'url_encode_paths_for_s3_download' into 'main'
Browse files Browse the repository at this point in the history
URL encode paths for S3 download

See merge request sanger-pathogens/pipelines/nano-rave!23
  • Loading branch information
Lfulcrum committed Jan 11, 2023
2 parents a0e638c + b4e0a13 commit 80cdd41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/download_test_data.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python3

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


def download_file(path: str):
url = BUCKET_URL + "/" + path
url = BUCKET_URL + "/" + urlparse.quote_plus(path)

# Note: '/' operator joins paths
dest = OUTPUT_DIR / path
Expand Down

0 comments on commit 80cdd41

Please sign in to comment.