You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
441 B
15 lines
441 B
import json
|
|
|
|
class Configuration(object):
|
|
def __init__(self, path):
|
|
try:
|
|
with open(path, 'r') as f:
|
|
self._config = json.load(f)
|
|
if self._config:
|
|
self.webhook_url = self._config["MAIN"]["WEBHOOK_URL"]
|
|
else:
|
|
print("error reading config")
|
|
exit(1)
|
|
except IOError:
|
|
print("error reading config")
|
|
exit(1) |