]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
patch in another location
authorbrentru <brent@adafruit.com>
Fri, 21 Jun 2024 15:04:08 +0000 (11:04 -0400)
committerbrentru <brent@adafruit.com>
Fri, 21 Jun 2024 15:04:08 +0000 (11:04 -0400)
src/adafruit_blinka/microcontroller/mcp2221/mcp2221.py

index 8e76cc7127a51f3aaf1baa0bf3b131bcd2f51ca5..2dcc5394718eb79efd25a5c0706b79187e015b97 100644 (file)
@@ -360,7 +360,8 @@ class MCP2221:
             # try a write
             try:
                 self.i2c_writeto(addr, b"\x00")
             # try a write
             try:
                 self.i2c_writeto(addr, b"\x00")
-            except RuntimeError:  # no reply!
+            except OSError:  # no reply!
+                # We got a NACK, which could be correct
                 continue
             # store if success
             found.append(addr)
                 continue
             # store if success
             found.append(addr)