tadd error message about wallet not loaded. fixes #2756 - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit cfa037fd6f680004e0a2ffc096f56a034bb5698d DIR parent c6e09a60388325050410101e78fb72f43aaa525b HTML Author: ThomasV <thomasv@electrum.org> Date: Thu, 17 Aug 2017 11:06:53 +0200 add error message about wallet not loaded. fixes #2756 Diffstat: M lib/commands.py | 3 +++ 1 file changed, 3 insertions(+), 0 deletions(-) --- DIR diff --git a/lib/commands.py b/lib/commands.py t@@ -80,6 +80,9 @@ def command(s): known_commands[name] = Command(func, s) @wraps(func) def func_wrapper(*args, **kwargs): + c = known_commands[func.__name__] + if c.requires_wallet and args[0].wallet is None: + raise BaseException("wallet not loaded. Use 'electrum daemon load_wallet'") return func(*args, **kwargs) return func_wrapper return decorator