Skip to content

Commit

Permalink
minor fixes to header parsing code
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeitsperre committed Oct 4, 2024
1 parent 0dc33ff commit f49d584
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/miranda/convert/_data_corrections.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ def metadata_conversion(d: xr.Dataset, p: str, m: dict) -> xr.Dataset:
logging.warning(msg)
continue
elif isinstance(header[field], dict):
attr_treatment = header[field]
attr_treatment = header[field][p]
else:
raise AttributeError(
f"Attribute treatment configuration for field `{field}` is not properly configured. Verify JSON."
Expand Down
2 changes: 1 addition & 1 deletion src/miranda/convert/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def _get_hash(f: str) -> str:
The hash.
"""
hash_sha256_writer = hashlib.sha256()
with Path(f).open("rb", encoding="utf-8") as f_opened:
with Path(f).open("rb") as f_opened:
hash_sha256_writer.update(f_opened.read())
sha256sum = hash_sha256_writer.hexdigest()
_msg = f"Calculated sha256sum (starting: {sha256sum[:6]})"
Expand Down

0 comments on commit f49d584

Please sign in to comment.