payment_identifiers:
- this separates GUI from core handling - the PaymentIdentifier class handles network requests - the GUI is agnostic about the type of PI
This commit is contained in:
committed by
Sander van Grieken
parent
d83149f668
commit
15eb765eac
@@ -93,6 +93,7 @@ sys._ELECTRUM_RUNNING_VIA_RUNELECTRUM = True # used by logging.py
|
||||
|
||||
from electrum.logging import get_logger, configure_logging # import logging submodule first
|
||||
from electrum import util
|
||||
from electrum.payment_identifier import PaymentIdentifier
|
||||
from electrum import constants
|
||||
from electrum import SimpleConfig
|
||||
from electrum.wallet_db import WalletDB
|
||||
@@ -364,9 +365,9 @@ def main():
|
||||
if not config_options.get('verbosity'):
|
||||
warnings.simplefilter('ignore', DeprecationWarning)
|
||||
|
||||
# check uri
|
||||
# check if we received a valid payment identifier
|
||||
uri = config_options.get('url')
|
||||
if uri and not util.is_uri(uri):
|
||||
if uri and not PaymentIdentifier(None, None, uri).is_valid():
|
||||
print_stderr('unknown command:', uri)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user