tmove import test to wallet.py - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 9dc8393cf6373bbb9c131ed24c7f372025d0d10e DIR parent 9a8f9cefed436d58aec6e239b91749300e8a9765 HTML Author: ThomasV <thomasv@gitorious> Date: Thu, 28 May 2015 15:39:26 +0200 move import test to wallet.py Diffstat: M lib/commands.py | 1 - M lib/wallet.py | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) --- DIR diff --git a/lib/commands.py b/lib/commands.py t@@ -277,7 +277,6 @@ class Commands: return s.encode('utf8') def importprivkey(self, sec): - assert self.wallet.can_import() try: addr = self.wallet.import_key(sec,self.password) out = "Keypair imported: ", addr DIR diff --git a/lib/wallet.py b/lib/wallet.py t@@ -288,6 +288,7 @@ class Abstract_Wallet(object): return account is not None def import_key(self, sec, password): + assert self.can_import() try: pubkey = public_key_from_private_key(sec) address = public_key_to_bc_address(pubkey.decode('hex'))