1
0
mirror of https://github.com/gryf/pywmtemp.git synced 2025-12-18 11:40:17 +01:00

Add guard for nonexistent pattern to match with.

This commit is contained in:
2022-09-16 17:08:57 +02:00
parent 6f9b91d525
commit 1f51add078

View File

@@ -233,6 +233,9 @@ class SensorDockApp(wmdocklib.DockApp):
if shw.label == item.get('label'):
temp = shw
break
else:
# in case there is no items matched.
return ' ', 0
value = int(temp.current)
name = item.get('name')