diff --git a/lib/qrscanner.py b/lib/qrscanner.py index 38cc1f3d0..419635c91 100644 --- a/lib/qrscanner.py +++ b/lib/qrscanner.py @@ -17,8 +17,11 @@ def scan_qr(config): device = config.get("video_device", "default") if device == 'default': device = '' - proc = zbar.Processor() - proc.init(video_device=device) + _proc = zbar.Processor() + _proc.init(video_device=device) + # set global only if init did not raise an exception + proc = _proc + proc.visible = True while True: