Skip to content

Commit 830cb3b

Browse files
committed
add exception type
1 parent 7044454 commit 830cb3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_mpl3115a2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def __init__(self, i2c, *, address=_MPL3115A2_ADDRESS):
144144
# try/except is a hack for RP2040
145145
try:
146146
self._poll_reg1(_MPL3115A2_CTRL_REG1_RST)
147-
except:
147+
except OSError:
148148
self._poll_reg1(_MPL3115A2_CTRL_REG1_RST)
149149
# Configure the chip registers with default values.
150150
self._ctrl_reg1 = _MPL3115A2_CTRL_REG1_OS128 | _MPL3115A2_CTRL_REG1_ALT

0 commit comments

Comments
 (0)