aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-12-06 16:32:12 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-12-06 16:32:12 +0000
commitc4c5c2937f06b5d408f85dfdad5b53db45e51f4b (patch)
tree1c0d81e747a1ebf05eb09365166eb9612b1d3f4c /src/util
parent2c30f1f771195b1be3439908d2291bcc717986bb (diff)
downloadgnunet-c4c5c2937f06b5d408f85dfdad5b53db45e51f4b.tar.gz
gnunet-c4c5c2937f06b5d408f85dfdad5b53db45e51f4b.zip
working again
Diffstat (limited to 'src/util')
-rwxr-xr-xsrc/util/gnunet-qr.py.in13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/util/gnunet-qr.py.in b/src/util/gnunet-qr.py.in
index 6f6118b28..94eb47bbf 100755
--- a/src/util/gnunet-qr.py.in
+++ b/src/util/gnunet-qr.py.in
@@ -1,4 +1,4 @@
1#@PYTHON@ 1#!@PYTHON@
2import sys 2import sys
3import getopt 3import getopt
4import subprocess 4import subprocess
@@ -36,7 +36,6 @@ if __name__ == '__main__':
36 help () 36 help ()
37 print str (e) 37 print str (e)
38 exit (1) 38 exit (1)
39 print "asdsa"
40 for o,a in opts: 39 for o,a in opts:
41 if o in ("-h", "--help"): 40 if o in ("-h", "--help"):
42 help () 41 help ()
@@ -49,7 +48,7 @@ if __name__ == '__main__':
49 silent = True 48 silent = True
50 elif o in ("-v", "--verbose"): 49 elif o in ("-v", "--verbose"):
51 verbose = True 50 verbose = True
52 id (True == verbose): 51 if (True == verbose):
53 print 'Initializing' 52 print 'Initializing'
54 # create a Processor 53 # create a Processor
55 proc = zbar.Processor() 54 proc = zbar.Processor()
@@ -59,7 +58,7 @@ if __name__ == '__main__':
59 58
60 # initialize the Processor 59 # initialize the Processor
61 try: 60 try:
62 id (True == verbose): 61 if (True == verbose):
63 print 'Opening video device ' + device 62 print 'Opening video device ' + device
64 proc.init(device) 63 proc.init(device)
65 except Exception as e: 64 except Exception as e:
@@ -75,7 +74,7 @@ if __name__ == '__main__':
75 proc.visible = True 74 proc.visible = True
76 # read at least one barcode (or until window closed) 75 # read at least one barcode (or until window closed)
77 try: 76 try:
78 id (True == verbose): 77 if (True == verbose):
79 print 'Capturing' 78 print 'Capturing'
80 proc.process_one() 79 proc.process_one()
81 except Exception as e: 80 except Exception as e:
@@ -99,9 +98,9 @@ if __name__ == '__main__':
99 for a in args: 98 for a in args:
100 cmd += " " + str(a) 99 cmd += " " + str(a)
101 if (verbose): 100 if (verbose):
102 print 'Running ' + cmd 101 print 'Running `' + cmd +'`'
103 res=subprocess.call(args) 102 res=subprocess.call(args)
104 if (0 != res): 103 if (0 != res):
105 print 'Failed to ' 104 print 'Failed to add URI ' + str(symbol.data)
106 exit (res) 105 exit (res)
107 exit (1) 106 exit (1)