mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 09:21:39 +00:00
parse_uri: don't use assert
This commit is contained in:
parent
ca5eb15abd
commit
950f3ae633
1 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue