We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc89d00 commit e586707Copy full SHA for e586707
adafruit_ahtx0.py
@@ -107,7 +107,7 @@ def reset(self) -> None:
107
108
def calibrate(self) -> bool:
109
"""Ask the sensor to self-calibrate. Returns True on success, False otherwise"""
110
- """Newer AHT20's may not succeed, so wrapping in try/except"""
+ # Newer AHT20's may not succeed, so wrapping in try/except
111
try:
112
self._buf[0] = AHTX0_CMD_CALIBRATE
113
self._buf[1] = 0x08
@@ -118,9 +118,9 @@ def calibrate(self) -> bool:
118
time.sleep(0.01)
119
if not self.status & AHTX0_STATUS_CALIBRATED:
120
return False
121
- return True
122
- except:
+ except Exception: # pylint: disable=broad-except
123
pass
+ return True
124
125
@property
126
def status(self) -> int:
0 commit comments