Skip to content

Commit

Permalink
Source
Browse files Browse the repository at this point in the history
  • Loading branch information
b8raoult committed Jan 25, 2022
1 parent 81c9a8e commit 94f1e1f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ecmwf/opendata/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ def url(self):
if self.source.startswith("http://") or self.source.startswith("https://"):
self._url = self.source
else:
if self.source not in URLS:
warning_once(
"Unknown source %r. Known sources are %r",
self.source,
list(URLS.keys()),
did_you_mean=(self.source, list(URLS.keys())),
)
raise ValueError("Unknown source %r" % (self.source,))
self._url = URLS[self.source]

return self._url
Expand Down

0 comments on commit 94f1e1f

Please sign in to comment.