diff --git a/pynitrokey/cli/fido2.py b/pynitrokey/cli/fido2.py index 43d94b4b..ea2656c8 100644 --- a/pynitrokey/cli/fido2.py +++ b/pynitrokey/cli/fido2.py @@ -784,7 +784,6 @@ def version(serial: Optional[str], udp: bool) -> None: res = nkfido2.find(serial, udp=udp).solo_version() major, minor, patch = res[:3] locked = "" - # @todo: if len(res) > 3: if res[3]: locked = "locked" diff --git a/pynitrokey/fido2/client.py b/pynitrokey/fido2/client.py index 4e6bb006..6bd3d1f8 100644 --- a/pynitrokey/fido2/client.py +++ b/pynitrokey/fido2/client.py @@ -210,12 +210,12 @@ def bootloader_version(self) -> Tuple[int, int, int]: return (data[0], data[1], data[2]) return (0, 0, data[0]) - def solo_version(self) -> Union[bytes, Tuple[int, int, int]]: + def solo_version(self) -> bytes: try: return self.send_data_hid(0x61, b"") except CtapError: data = self.exchange(SoloExtension.version) - return (data[0], data[1], data[2]) + return data[:3] def write_flash(self, addr: int, data: bytes) -> None: self.exchange(SoloBootloader.write, addr, data)