remove fallback values

with an empty string re will not match
This commit is contained in:
alfrix
2024-01-07 17:27:43 -03:00
parent 2527a12d32
commit 05cd9a6d34
4 changed files with 5 additions and 4 deletions

View File

@@ -16,7 +16,7 @@ class Panel(ScreenPanel):
super().__init__(screen, title)
if self.ks_printer_cfg is not None:
dis = self.ks_printer_cfg.get("move_distances", '0.1, 0.5, 1, 50, 10, 25, 50')
dis = self.ks_printer_cfg.get("move_distances", '')
if re.match(r'^[0-9,\.\s]+$', dis):
dis = [str(i.strip()) for i in dis.split(',')]
if 1 < len(dis) <= 7: