tstrip whitespaces from seed - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit bb859c244b219479be2ea0980ff552bd9df362e4
DIR parent 6dfeb9001ade5e2423830e9c750bd52b0906a6ae
HTML Author: ThomasV <thomasv@gitorious>
Date: Tue, 11 Feb 2014 15:27:28 +0100
strip whitespaces from seed
Diffstat:
M lib/wallet.py | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
---
DIR diff --git a/lib/wallet.py b/lib/wallet.py
t@@ -308,14 +308,11 @@ class Wallet:
self.seed_version = 4
return
- #if not seed:
- # self.seed = self.make_seed()
- # self.seed_version = SEED_VERSION
- # return
-
- # find out what kind of wallet we are
+ # check if seed is hexadecimal
+ seed = seed.strip()
try:
- seed.strip().decode('hex')
+ assert seed
+ seed.decode('hex')
self.seed_version = 4
self.seed = str(seed)
return