|
@ -17,8 +17,11 @@ def scan_qr(config): |
|
|
device = config.get("video_device", "default") |
|
|
device = config.get("video_device", "default") |
|
|
if device == 'default': |
|
|
if device == 'default': |
|
|
device = '' |
|
|
device = '' |
|
|
proc = zbar.Processor() |
|
|
_proc = zbar.Processor() |
|
|
proc.init(video_device=device) |
|
|
_proc.init(video_device=device) |
|
|
|
|
|
# set global only if init did not raise an exception |
|
|
|
|
|
proc = _proc |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
proc.visible = True |
|
|
proc.visible = True |
|
|
while True: |
|
|
while True: |
|
|