Skip to content

Commit 7f090fe

Browse files
author
Benjamin Moody
committed
get_dbs: use _get_url in place of requests.get.
Note that this will handle errors (e.g. a file that does not exist) and raise an exception, rather than trying to parse the error document.
1 parent a173913 commit 7f090fe

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

wfdb/io/download.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ def get_dbs():
258258
]
259259
260260
"""
261-
response = requests.get('https://physionet.org/rest/database-list/')
262-
dbs = json.loads(response.content)
261+
content = _get_url('https://physionet.org/rest/database-list/')
262+
dbs = json.loads(content)
263263
dbs = [[d['slug'], d['title']] for d in dbs]
264264
dbs.sort()
265265

0 commit comments

Comments
 (0)