Skip to content

Commit 9de26f1

Browse files
Merge branch 'adafruit:main' into main
2 parents 6b2d57a + 322e03f commit 9de26f1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ jobs:
3535
for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do
3636
sed -i -e "s/0.0.0+auto.0/${{github.event.release.tag_name}}/" $file;
3737
done;
38-
python -m build -s
38+
python -m build
3939
twine upload dist/*

src/adafruit_blinka/microcontroller/mcp2221/mcp2221.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ def _i2c_write(self, cmd, address, buffer, start=0, end=None):
248248
for _ in range(MCP2221_RETRY_MAX):
249249
status = self._i2c_status()
250250
if status[20] & MASK_ADDR_NACK:
251-
raise RuntimeError("I2C slave address was NACK'd")
251+
raise OSError("I2C slave address was NACK'd")
252252
usb_cmd_status = status[8]
253253
if usb_cmd_status == 0:
254254
break
@@ -360,7 +360,8 @@ def i2c_scan(self, *, start=0, end=0x79):
360360
# try a write
361361
try:
362362
self.i2c_writeto(addr, b"\x00")
363-
except RuntimeError: # no reply!
363+
except OSError: # no reply!
364+
# We got a NACK, which could be correct
364365
continue
365366
# store if success
366367
found.append(addr)

0 commit comments

Comments
 (0)