Skip to content

Commit 760b6b0

Browse files
authored
Add pooch downloader to workaround readthedocs/readthedocs.org#11763 (#547)
1 parent c656abd commit 760b6b0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cf_xarray/utils.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,16 @@ def parse_cf_standard_name_table(source=None):
108108
if not source:
109109
import pooch
110110

111+
downloader = pooch.HTTPDownloader(
112+
# https://github.com/readthedocs/readthedocs.org/issues/11763
113+
headers={"User-Agent": "cf-xarray"}
114+
)
115+
111116
source = pooch.retrieve(
112117
"https://raw.githubusercontent.com/cf-convention/cf-convention.github.io/"
113118
"master/Data/cf-standard-names/current/src/cf-standard-name-table.xml",
114119
known_hash=None,
120+
downloader=downloader,
115121
)
116122
root = ElementTree.parse(source).getroot()
117123

0 commit comments

Comments
 (0)