diff --git a/barcode/codex.py b/barcode/codex.py index 8e4c146..b82c020 100755 --- a/barcode/codex.py +++ b/barcode/codex.py @@ -209,7 +209,7 @@ def look_next() -> bool: codes = self._new_charset("B") return codes - def _convert(self, char: str) -> int: + def _convert(self, char: str): if self._charset == "A": return code128.A[char] if self._charset == "B": @@ -223,6 +223,7 @@ def _convert(self, char: str) -> int: value = int(self._buffer) self._buffer = "" return value + return None raise RuntimeError( f"Character {char} could not be converted in charset {self._charset}." )