Skip to content

Commit

Permalink
Fixes erroneous URL #247
Browse files Browse the repository at this point in the history
Fixes URL generation for Windows machines by removing the os.sep operation. Fixes #247.
  • Loading branch information
Lucas-Mc committed Aug 20, 2020
1 parent 1dd4b5c commit 77a8b35
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion wfdb/io/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ def dl_files(db, dl_dir, files, keep_subdirs=True, overwrite=False):
"""
# Full url PhysioNet database
db_dir = posixpath.join(db, record.get_version(db))
db_url = posixpath.join(PN_CONTENT_URL, db_dir) + os.sep
db_url = posixpath.join(PN_CONTENT_URL, db_dir) + '/'

# Check if the database is valid
response = requests.get(db_url)
Expand Down
2 changes: 1 addition & 1 deletion wfdb/io/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -3381,7 +3381,7 @@ def dl_database(db_dir, dl_dir, records='all', annotators='all',
db_dir = posixpath.join(dir_list[0], get_version(dir_list[0]), *dir_list[1:])
else:
db_dir = posixpath.join(db_dir, get_version(db_dir))
db_url = posixpath.join(download.PN_CONTENT_URL, db_dir) + os.sep
db_url = posixpath.join(download.PN_CONTENT_URL, db_dir) + '/'
# Check if the database is valid
r = requests.get(db_url)
r.raise_for_status()
Expand Down

0 comments on commit 77a8b35

Please sign in to comment.