From e442fc9f0f3edcb08fb9ba0a0413fc46450fbe44 Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Fri, 6 Feb 2026 18:57:16 +0100 Subject: [PATCH] initialize and handle missing --- scam.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scam.py b/scam.py index fdbb766..1ce104e 100755 --- a/scam.py +++ b/scam.py @@ -81,6 +81,8 @@ class MainPanel(wx.Panel): self.instance = None self.camera = None + self.orig_cfg = None + self.pls = pls = Pipelines() pl_names = [GOOD + n for n in pls.active] @@ -326,7 +328,7 @@ def check_incoming_cfg(cfg): def check_outgoing_cfg(cfg): - bkg = cfg["image_background"] + bkg = cfg.get("image_background", None) cfg["image_background_enable"] = "passive" if bkg else None cfg["image_threshold"] = None