mirror of
https://github.com/gryf/pywmtemp.git
synced 2026-11-20 14:06:58 +01:00
Add guard for nonexistent pattern to match with.
This commit is contained in:
1 parent
6f9b91d525
commit
1f51add078
1 file changed
+3
@@ -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')
|
||||
|
||||
Reference in new issue
Block a user