Skip to content

Commit 5e48fa4

Browse files
committed
update _reset for mcp2221 case
1 parent 5c1e198 commit 5e48fa4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

adafruit_sgp40.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,9 @@ def _reset(self):
150150
self._command_buffer[1] = 0x06
151151
try:
152152
self._read_word_from_command(delay_ms=50)
153-
except OSError:
153+
except (OSError, RuntimeError):
154154
# Got expected OSError from reset
155+
# or RuntimeError on some Blinka setups
155156
pass
156157
sleep(1)
157158

0 commit comments

Comments
 (0)