Browse Source

Added check if video device is available

283
slush 13 years ago
parent
commit
2791ecc167
  1. 8
      lib/qrscanner.py

8
lib/qrscanner.py

@ -11,6 +11,14 @@ from urlparse import urlparse, parse_qs
def is_available():
if not zbar:
return False
try:
proc = zbar.Processor()
proc.init()
except zbar.SystemError:
# Cannot open video device
return False
return True
def scan_qr():

Loading…
Cancel
Save