From 4bb77c3bb33ddd75fa77f043aaf0083f0e54a440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odd=20Str=C3=A5b=C3=B8?= Date: Sat, 9 Dec 2023 19:17:27 +0100 Subject: [PATCH] Add fixme comments --- srnemqtt/protocol.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srnemqtt/protocol.py b/srnemqtt/protocol.py index be711ef..50cfc06 100644 --- a/srnemqtt/protocol.py +++ b/srnemqtt/protocol.py @@ -212,7 +212,7 @@ class ChargeController: def serial(self) -> str: data = readMemory(self.device, 0x18, 3) if data is None: - raise IOError + raise IOError # FIXME: Raise specific error in readMemory p1 = data[0] p2 = data[1] @@ -223,7 +223,7 @@ class ChargeController: def model(self) -> str: data = readMemory(self.device, 0x0C, 8) if data is None: - raise IOError + raise IOError # FIXME: Raise specific error in readMemory return data.decode("utf-8").strip() @@ -231,7 +231,7 @@ class ChargeController: def version(self) -> str: data = readMemory(self.device, 0x14, 4) if data is None: - raise IOError + raise IOError # FIXME: Raise specific error in readMemory major = (data[0] << 8) + data[1] minor = data[2] @@ -243,7 +243,7 @@ class ChargeController: def load_enabled(self) -> bool: data = readMemory(self.device, 0x010A, 1) if data is None: - raise IOError + raise IOError # FIXME: Raise specific error in readMemory return struct.unpack("x?", data)[0]