kunsi-mako-templating #7
1 changed files with 4 additions and 1 deletions
|
@ -2,11 +2,14 @@
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
import urllib3
|
import urllib3
|
||||||
|
from os import environ
|
||||||
|
|
||||||
import tomlkit
|
import tomlkit
|
||||||
|
|
||||||
urllib3.disable_warnings()
|
urllib3.disable_warnings()
|
||||||
|
|
||||||
|
CONFIGFILE = environ.get('STATUSPAGE_CONFIG', 'config.toml')
|
||||||
|
|
||||||
class StatusPage:
|
class StatusPage:
|
||||||
def get_api_result(self):
|
def get_api_result(self):
|
||||||
if self.services:
|
if self.services:
|
||||||
|
@ -141,7 +144,7 @@ class StatusPage:
|
||||||
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.config = tomlkit.loads(open('config.toml').read())
|
self.config = tomlkit.loads(open(CONFIGFILE).read())
|
||||||
self.services = {}
|
self.services = {}
|
||||||
self.ragecounter = 0
|
self.ragecounter = 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue