def fullname(self): return 'QR scans'
- def description(self): return "QR Scans.\nInstall the zbar package (http://zbar.sourceforge.net/download.html) to enable this plugin"
+ def description(self): return "QR Scans.\nInstall the zbar package to enable this plugin.\nOn linux, type: 'apt-get install python-zbar'"
def __init__(self, gui, name):
BasePlugin.__init__(self, gui, name)
while True:
try:
proc.process_one()
- except:
+ except Exception:
# User closed the preview window
return {}
try:
amount = self.gui.main_window.read_amount(unicode( self.gui.main_window.amount_e.text()))
- except:
+ except Exception:
QMessageBox.warning(self.gui.main_window, _('Error'), _('Invalid Amount'), _('OK'))
return
try:
fee = self.gui.main_window.read_amount(unicode( self.gui.main_window.fee_e.text()))
- except:
+ except Exception:
QMessageBox.warning(self.gui.main_window, _('Error'), _('Invalid Fee'), _('OK'))
return
try:
tx = self.gui.main_window.wallet.mktx( [(to_address, amount)], None, fee)
- except BaseException, e:
+ except Exception as e:
self.gui.main_window.show_message(str(e))
return
input_info = []
- except BaseException, e:
+ except Exception as e:
self.gui.main_window.show_message(str(e))
try:
json_text = json.dumps(tx.as_dict()).replace(' ', '')
self.show_tx_qrcode(json_text, 'Unsigned Transaction')
- except BaseException, e:
+ except Exception as e:
self.gui.main_window.show_message(str(e))
def show_tx_qrcode(self, data, title):
self.gui.main_window.wallet.signrawtransaction(tx, input_info, [], password)
txtext = json.dumps(tx.as_dict()).replace(' ', '')
self.show_tx_qrcode(txtext, 'Signed Transaction')
- except BaseException, e:
+ except Exception as e:
self.gui.main_window.show_message(str(e))
uri = urlparse(uri)
result = {'address': uri.netloc}
- if uri.path.startswith('?'):
- params = parse_qs(uri.path[1:])
+ if uri.query.startswith('?'):
+ params = parse_qs(uri.query[1:])
else:
- params = parse_qs(uri.path)
+ params = parse_qs(uri.query)
for k,v in params.items():
if k in ('amount', 'label', 'message'):