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]