1
0

Simplify services (watchtower, payserver):

- Do not expose services settings in GUI
 - Use a single netaddress configuration variable.
This commit is contained in:
ThomasV
2020-05-10 14:52:20 +02:00
parent 526c75ad53
commit 11aaa0b66f
6 changed files with 41 additions and 137 deletions

View File

@@ -9,6 +9,7 @@ from typing import Union, Optional
from numbers import Real
from copy import deepcopy
from aiorpcx import NetAddress
from . import util
from . import constants
@@ -592,6 +593,15 @@ class SimpleConfig(Logger):
SSL_identity = None
return SSL_identity
def get_netaddress(self, key: str) -> Optional[NetAddress]:
text = self.get(key)
if text:
try:
host, port = text.split(':')
return NetAddress(host, port)
except:
pass
def read_user_config(path):
"""Parse and store the user config settings in electrum.conf into user_config[]."""