import subprocess
from sys import argv
try:
- import zbar
+ import zbar
except ImportError as e:
- print 'Cannot run gnunet-qr, please install zbar-python'
- sys.exit (1)
+ print 'Cannot run gnunet-qr, please install zbar-python'
+ sys.exit (1)
def help ():
print 'gnunet-qr\n\
print 'Running `' + cmd +'`'
res=subprocess.call(args)
if (0 != res):
- print 'Failed to add URI ' + str(symbol.data)
+ print 'Failed to add URI ' + str(symbol.data)
+ else:
+ print 'Added URI ' + str(symbol.data)
exit (res)
exit (1)