Skip to content

Commit

Permalink
string compat for <py3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
tasansal committed Jan 10, 2025
1 parent 405b5c6 commit d7af95a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mdio/segy/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def revision_encode(binary_header: dict, version_str: str) -> dict:
raise InvalidMDIOError(msg) from KeyError

code = (major << 8) | minor
code_hex = f"0x{code:04x}"
binary_header["segy_revision"] = code
logger.info(f"Encoded revision {major}.{minor} to {code=} ~ {f"0x{code:04x}"}")
logger.info(f"Encoded revision {major}.{minor} to {code=} ~ {code_hex}")
return binary_header

0 comments on commit d7af95a

Please sign in to comment.