Commit c71da447 authored by Moul's avatar Moul
Browse files

[enh] store default endpoint in constants file.

parent fb82a7b1
...@@ -2,3 +2,4 @@ SILKAJ_VERSION = "silkaj 0.4.0" ...@@ -2,3 +2,4 @@ SILKAJ_VERSION = "silkaj 0.4.0"
NO_MATCHING_ID = "No matching identity" NO_MATCHING_ID = "No matching identity"
G1_SYMBOL = "Ğ1" G1_SYMBOL = "Ğ1"
GTEST_SYMBOL = "ĞTest" GTEST_SYMBOL = "ĞTest"
G1_DEFAULT_ENDPOINT = "g1.duniter.org", "443"
...@@ -70,7 +70,7 @@ def cli(): ...@@ -70,7 +70,7 @@ def cli():
message_exit(SILKAJ_VERSION) message_exit(SILKAJ_VERSION)
if cli_args.is_help_request() or cli_args.is_usage_request() or cli_args.subcmd not in subcmd: if cli_args.is_help_request() or cli_args.is_usage_request() or cli_args.subcmd not in subcmd:
usage() usage()
ep["domain"], ep["port"] = "g1.duniter.org", "443" ep["domain"], ep["port"] = G1_DEFAULT_ENDPOINT
try: try:
ep["domain"], ep["port"] = cli_args.get_definition('p').rsplit(':', 1) ep["domain"], ep["port"] = cli_args.get_definition('p').rsplit(':', 1)
except: except:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment