style: some weird black code reformatting
This commit is contained in:
parent
673a3768b8
commit
9ad1ce38ee
5 changed files with 82 additions and 53 deletions
14
config.py
14
config.py
|
@ -12,9 +12,11 @@ class _General:
|
|||
sourceurl: Optional[str]
|
||||
|
||||
def __init__(self):
|
||||
self.token = _c.get('General', 'Token')
|
||||
self.sourceurl = _c.get('General', 'SourceUrl')
|
||||
if not self.sourceurl.startswith("http://") and not self.sourceurl.startswith("https://"):
|
||||
self.token = _c.get("General", "Token")
|
||||
self.sourceurl = _c.get("General", "SourceUrl")
|
||||
if not self.sourceurl.startswith("http://") and not self.sourceurl.startswith(
|
||||
"https://"
|
||||
):
|
||||
self.sourceurl = None
|
||||
|
||||
|
||||
|
@ -24,8 +26,8 @@ class _App:
|
|||
hostname: str
|
||||
|
||||
def __init__(self):
|
||||
self.name = _c.get('App', 'Name')
|
||||
self.host = _c.get('App', 'Host')
|
||||
self.name = _c.get("App", "Name")
|
||||
self.host = _c.get("App", "Host")
|
||||
# noinspection PyBroadException
|
||||
try:
|
||||
response = requests.get(f"http://{self.host}/status.json")
|
||||
|
@ -34,7 +36,7 @@ class _App:
|
|||
except:
|
||||
print("Unable validate App.Host in config.ini.")
|
||||
exit(1)
|
||||
self.hostname = _c.get('App', 'HostName')
|
||||
self.hostname = _c.get("App", "HostName")
|
||||
if not self.hostname:
|
||||
self.hostname = self.host
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue