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:
@@ -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