From d7af95a8a49a969d0576389330134d5a4b8206c5 Mon Sep 17 00:00:00 2001 From: Altay Sansal Date: Fri, 10 Jan 2025 14:16:02 -0600 Subject: [PATCH] string compat for 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