Skip to content

Commit 5872784

Browse files
committed
fix dl_database arguments. Fixes #106
1 parent d40d5ba commit 5872784

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

wfdb/io/record.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,8 +1314,8 @@ def orderednoconseclist(fulllist):
13141314
return noconseclist
13151315

13161316

1317-
def dl_database(db_dir, dl_dir, records='all', annotators='all', keep_subdirs=True,
1318-
overwrite = False):
1317+
def dl_database(db_dir, dl_dir, records='all', annotators='all',
1318+
keep_subdirs=True, overwrite = False):
13191319
"""
13201320
Download WFDB record (and optionally annotation) files from a
13211321
Physiobank database. The database must contain a 'RECORDS' file in
@@ -1361,8 +1361,10 @@ def dl_database(db_dir, dl_dir, records='all', annotators='all', keep_subdirs=Tr
13611361
>>> wfdb.dl_database('ahadb', os.getcwd())
13621362
13631363
"""
1364+
# Full url physiobank database
1365+
db_url = posixpath.join(download.db_index_url, db_dir)
13641366
# Check if the database is valid
1365-
r = requests.get(dburl)
1367+
r = requests.get(db_url)
13661368
r.raise_for_status()
13671369

13681370
# Get the list of records

0 commit comments

Comments
 (0)