diff options
author | Eddy Comyn-Platt <53045993+EddyCMWF@users.noreply.github.com> | 2023-02-27 11:08:31 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-27 11:08:31 +0000 |
commit | 7361974b7665e6564988d16ede6281a7077a5728 (patch) | |
tree | 02b426f3b365e89e8e96acc3198f0397a0e15e7e | |
parent | f3b94a9bc40f8d56b0d1ac8cc8bc84765509ef05 (diff) |
Assertion error for cdsapi key (#60)
-rw-r--r-- | cdsapi/api.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cdsapi/api.py b/cdsapi/api.py index a603716..79c2ef3 100644 --- a/cdsapi/api.py +++ b/cdsapi/api.py @@ -322,6 +322,10 @@ class Client(object): self.session = session self.session.auth = tuple(self.key.split(":", 2)) + assert len(self.session.auth)==2, ( + "The cdsapi key provided is not the correct format, please ensure it conforms to:\n" + "<UID>:<APIKEY>" + ) self.metadata = metadata self.forget = forget |