X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=gui%2Ftext.py;h=0c6a1487c47e37db050e8853e61ad7c688b246bf;hb=73ee95ec9aa815537c20f009ac2eef81ba2f9a47;hp=437ce35664c23b82539efe718947031f15e2df1b;hpb=09b0eeedfb36b9e913b0a196aa5bff110f0b259b;p=electrum-nvc.git diff --git a/gui/text.py b/gui/text.py index 437ce35..0c6a148 100644 --- a/gui/text.py +++ b/gui/text.py @@ -64,7 +64,7 @@ class ElectrumGui: def set_cursor(self, x): try: curses.curs_set(x) - except: + except Exception: pass def restore_or_create(self): @@ -112,7 +112,7 @@ class ElectrumGui: if conf: try: time_str = datetime.datetime.fromtimestamp( timestamp).isoformat(' ')[:-3] - except: + except Exception: time_str = "------" else: time_str = 'pending' @@ -291,12 +291,12 @@ class ElectrumGui: return try: amount = int( Decimal( self.str_amount) * 100000000 ) - except: + except Exception: self.show_message(_('Invalid Amount')) return try: fee = int( Decimal( self.str_fee) * 100000000 ) - except: + except Exception: self.show_message(_('Invalid Fee')) return @@ -309,7 +309,7 @@ class ElectrumGui: try: tx = self.wallet.mktx( [(self.str_recipient, amount)], password, fee) - except BaseException, e: + except Exception as e: self.show_message(str(e)) return @@ -319,7 +319,7 @@ class ElectrumGui: h = self.wallet.send_tx(tx) self.show_message(_("Please wait..."), getchar=False) self.wallet.tx_event.wait() - status, msg = self.wallet.receive_tx( h ) + status, msg = self.wallet.receive_tx( h, tx ) if status: self.show_message(_('Payment sent.')) @@ -360,7 +360,7 @@ class ElectrumGui: if not auto_connect: try: host, port, protocol = server.split(':') - except: + except Exception: self.show_message("Error:" + server + "\nIn doubt, type \"auto-connect\"") return False @@ -468,7 +468,7 @@ class ElectrumGui: choices = item.get('choices') try: j = choices.index(item.get('value')) - except: + except Exception: j = 0 new_choice = choices[(j + 1)% len(choices)] item['value'] = new_choice