tfix: is_address, is_private_key: check that text is not empty - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 97a6f91451f3242e7550a03cdcad9e40fe9cb9f0
DIR parent 8ca7964dac5232d218a51bc3f533260406eebb30
HTML Author: ThomasV <thomasv@gitorious>
Date: Mon, 5 May 2014 10:03:31 +0200
fix: is_address, is_private_key: check that text is not empty
Diffstat:
M lib/wallet.py | 4 ++++
1 file changed, 4 insertions(+), 0 deletions(-)
---
DIR diff --git a/lib/wallet.py b/lib/wallet.py
t@@ -1667,6 +1667,8 @@ class Wallet(object):
@classmethod
def is_address(self, text):
+ if not text:
+ return False
for x in text.split():
if not bitcoin.is_address(x):
return False
t@@ -1674,6 +1676,8 @@ class Wallet(object):
@classmethod
def is_private_key(self, text):
+ if not text:
+ return False
for x in text.split():
if not bitcoin.is_private_key(x):
return False