Skip to content

Commit

Permalink
Merge pull request #26 from GermanoGuerrini/master
Browse files Browse the repository at this point in the history
Fixed filename extraction
  • Loading branch information
ricardo-correa authored Jun 11, 2024
2 parents e64c51d + c338b5c commit bb9e6ad
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
copyright = "2023, ECMWF"
author = "ECMWF"

release = "2.14"
version = "2.14"
release = "2.15"
version = "2.15"

# -- General configuration

Expand Down
9 changes: 7 additions & 2 deletions hda/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,13 @@ def get_filename(response, fallback):
if cd is None:
return fallback

return cd[cd.find("filename=") + len("filename=") :]
filename = cd[cd.find("filename=") + len("filename=") :]
if filename.startswith('"'):
filename = filename[1:]
if filename.endswith('"'):
filename = filename[:-1]

return filename


class HDAError(Exception):
Expand Down Expand Up @@ -262,7 +268,6 @@ def __getitem__(self, index):

def _download(self, result, download_dir: str = "."):
logger.debug(result)

self.client.accept_tac(self.dataset)

query = {
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def read(fname):
return io.open(file_path, encoding="utf-8").read()


version = "2.14"
version = "2.15"

setuptools.setup(
name="hda",
Expand Down

0 comments on commit bb9e6ad

Please sign in to comment.