Skip to content

Commit

Permalink
Merge pull request #1582 from materialsproject/dev
Browse files Browse the repository at this point in the history
client: fix no exceptions
  • Loading branch information
tschaume authored Jun 22, 2023
2 parents 6c33974 + b35a7aa commit aee671b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mpcontribs-client/mpcontribs/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,14 +454,14 @@ def from_textfile(cls, path: Union[Path, str]):
"""
try:
path = Path(path)
except:
except TypeError:
raise MPContribsClientError(f"Failed to coerce {path} into pathlib.Path type.")

content = path.read_bytes()

try:
content = gzip.compress(content)
except:
except Exception:
raise MPContribsClientError(f"Failed to gzip {path}.")

size = len(content)
Expand Down

0 comments on commit aee671b

Please sign in to comment.