_mode = None
_i2c_bus = None
+ # pylint: disable=unused-argument
def __init__(self, bus_num, mode=MASTER, baudrate=None):
if mode != self.MASTER:
raise NotImplementedError("Only I2C Master supported!")
except FileNotFoundError:
raise RuntimeError(
"I2C Bus #%d not found, check if enabled in config!" % bus_num
- )
+ ) from RuntimeError
+
+ # pylint: enable=unused-argument
def scan(self):
"""Try to read a byte from each address, if you get an OSError