electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 950f3ae633ae2d774dbbd0f60dd23cd8be06c624
parent ca5eb15abd93f4f88232e4e33c2a057f7f6006c5
Author: ThomasV <thomasv@electrum.org>
Date:   Sat, 13 Feb 2016 15:09:42 +0100

parse_uri: don't use assert

Diffstat:
Mlib/util.py | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/util.py b/lib/util.py @@ -330,12 +330,13 @@ def parse_URI(uri, on_pr=None): from bitcoin import COIN if ':' not in uri: - assert bitcoin.is_address(uri) + if not bitcoin.is_address(uri): + raise BaseException("Not a bitcoin address") return {'address': uri} u = urlparse.urlparse(uri) - assert u.scheme == 'bitcoin' - + if u.scheme != 'bitcoin': + raise BaseException("Not a bitcoin URI") address = u.path # python for android fails to parse query