We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fffb426 commit a13c1e2Copy full SHA for a13c1e2
wfdb/io/download.py
@@ -105,15 +105,11 @@ def _stream_header(file_name: str, pn_dir: str) -> str:
105
The text contained in the header file
106
107
"""
108
- # Full cloud url
109
- if any(pn_dir.startswith(proto) for proto in CLOUD_PROTOCOLS):
110
- url = posixpath.join(pn_dir, file_name)
111
- # Full physionet database url
112
- else:
113
- url = posixpath.join(config.db_index_url, pn_dir, file_name)
+ # Full url of header location
+ url = posixpath.join(config.db_index_url, pn_dir, file_name)
114
115
# Get the content of the remote file
116
- with fsspec.open(url, "rb") as f:
+ with _url.openurl(url, "rb") as f:
117
content = f.read()
118
119
return content.decode("iso-8859-1")
0 commit comments