Skip to content

Commit

Permalink
Suppress deprecated accesses to properties for devicestatus repr (#1487)
Browse files Browse the repository at this point in the history
  • Loading branch information
rytilahti authored Aug 11, 2022
1 parent c1f6b1f commit 015fe47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion miio/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __repr__(self):
name, prop = prop_tuple
try:
# ignore deprecation warnings
with warnings.catch_warnings():
with warnings.catch_warnings(record=True):
prop_value = prop.fget(self)
except Exception as ex:
prop_value = ex.__class__.__name__
Expand Down

0 comments on commit 015fe47

Please sign in to comment.