Skip to content

Commit 413c89b

Browse files
Changed Exception raised by hysteresis setter to more specific ValueError
1 parent 4ac081e commit 413c89b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

adafruit_adt7410.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ def hysteresis(self) -> int:
212212
@hysteresis.setter
213213
def hysteresis(self, value: int) -> None:
214214
if value > 15 or isinstance(value, float):
215-
raise Exception("Hysteresis value must be an integer lower than 15 Celsius")
215+
raise ValueError(
216+
"Hysteresis value must be an integer lower than 15 Celsius"
217+
)
216218

217219
self._write_register(_ADT7410_THYST, value)

0 commit comments

Comments
 (0)