fix cast of command which might not be a number

This commit is contained in:
2023-12-28 15:42:01 +01:00
parent b8d94b271f
commit 2622d514c4

View File

@@ -297,7 +297,10 @@ class Slider(Div):
badge_name = self.description if self.description else self.name
value = self.min
if self.state_command:
value = float(process(self.state_command, shell=True))
try:
value = float(process(self.state_command, shell=True))
except Exception as e:
print(e)
# 1st row; badge
badge = QBadge(