tget_amount returns None if there's an exception - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit d3ba8fb507159521fdef77d98af264bfb9b7cbb2 DIR parent 04ee06985c5ca1686b6e5affc9d2f81b5e3f2b03 HTML Author: ThomasV <thomasv@gitorious> Date: Thu, 12 Jun 2014 09:15:25 +0200 get_amount returns None if there's an exception Diffstat: M gui/qt/main_window.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) --- DIR diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py t@@ -816,9 +816,8 @@ class ElectrumWindow(QMainWindow): amount = sum(map(lambda x:x[1], outputs)) - try: - fee = self.fee_e.get_amount() - except Exception: + fee = self.fee_e.get_amount() + if fee is None: QMessageBox.warning(self, _('Error'), _('Invalid Fee'), _('OK')) return t@@ -2303,9 +2302,8 @@ class ElectrumWindow(QMainWindow): # run the dialog if not d.exec_(): return - try: - fee = self.fee_e.get_amount() - except Exception: + fee = self.fee_e.get_amount() + if fee is None: QMessageBox.warning(self, _('Error'), _('Invalid value') +': %s'%fee, _('OK')) return