git://git.novaco.in
/
electrum-nvc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
380242f
)
Added check if video device is available
author
slush
<info@bitcoin.cz>
Fri, 3 Aug 2012 14:05:47 +0000 (16:05 +0200)
committer
slush
<info@bitcoin.cz>
Fri, 3 Aug 2012 14:05:47 +0000 (16:05 +0200)
lib/qrscanner.py
patch
|
blob
|
history
diff --git
a/lib/qrscanner.py
b/lib/qrscanner.py
index
eb3571a
..
bbf11c5
100644
(file)
--- a/
lib/qrscanner.py
+++ b/
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():