commit b9776201ce361e32ef20593908cd8c0b1762eedf
parent 219461ef57f17ebe602388705dcd17f042cbb988
Author: ThomasV <thomasv@electrum.org>
Date: Thu, 18 Feb 2016 11:24:38 +0100
kivy: catch NotEnoughFunds
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gui/kivy/uix/screens.py b/gui/kivy/uix/screens.py
@@ -18,7 +18,7 @@ from kivy.lang import Builder
from kivy.factory import Factory
from kivy.utils import platform
-from electrum.util import profiler, parse_URI, format_time, InvalidPassword
+from electrum.util import profiler, parse_URI, format_time, InvalidPassword, NotEnoughFunds
from electrum import bitcoin
from electrum.util import timestamp_to_datetime
from electrum.plugins import run_hook
@@ -260,6 +260,9 @@ class SendScreen(CScreen):
config = self.app.electrum_config
try:
tx = self.app.wallet.make_unsigned_transaction(coins, outputs, config, None)
+ except NotEnoughFunds:
+ self.app.show_error(_("Not enough funds"))
+ return
except Exception as e:
traceback.print_exc(file=sys.stdout)
self.app.show_error(str(e))