added handling errors from (MathEntry) GetValue

This commit is contained in:
2022-10-30 21:08:23 +01:00
parent f15799bd34
commit ccca4f4421
+6 -1
View File
@@ -138,7 +138,12 @@ class ETADisplay(PVDisplay):
def update(self, _event):
factor = 1
for tc in self.textctrls:
val = tc.GetValue()
try:
val = tc.GetValue()
except:
# if any of the values is missing, cannot calculate factor
factor = None
break
try:
val = int(val)
except (ValueError, TypeError):