From b38d01148ee48a8dda628859627237f91a0cfe41 Mon Sep 17 00:00:00 2001 From: James Bowman Date: Sat, 25 Jan 2020 18:51:29 -0800 Subject: [PATCH] Proper busy bus expection --- python/i2cdriver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/i2cdriver.py b/python/i2cdriver.py index 9306fb7..fec3ebf 100644 --- a/python/i2cdriver.py +++ b/python/i2cdriver.py @@ -110,7 +110,7 @@ class I2CDriver: return if reset or (self.scl, self.sda) != (1, 1): if self.reset() != 3: - assert 0, "I2C bus is busy" + raise I2CTimeout("Bus failed to reset - check connected devices") self.getstatus() self.setspeed(100)