git://git.novaco.in
/
electrum-nvc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
0f661aa
)
add error message for import_key failure
author
ecdsa
<ecdsa@github>
Sun, 5 May 2013 15:38:59 +0000 (17:38 +0200)
committer
ecdsa
<ecdsa@github>
Sun, 5 May 2013 15:38:59 +0000 (17:38 +0200)
lib/wallet.py
patch
|
blob
|
history
diff --git
a/lib/wallet.py
b/lib/wallet.py
index
8ccd67a
..
189fa10
100644
(file)
--- a/
lib/wallet.py
+++ b/
lib/wallet.py
@@
-137,7
+137,10
@@
class Wallet:
def import_key(self, sec, password):
# check password
seed = self.decode_seed(password)
- address = address_from_private_key(sec)
+ try:
+ address = address_from_private_key(sec)
+ except:
+ raise BaseException('Invalid private key')
if self.is_mine(address):
raise BaseException('Address already in wallet')