summaryrefslogtreecommitdiff
path: root/settings.py
blob: e94dbe2ae487cf93a44e1a206c8f8417bd075d1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import json
from logging import exception

def getSettings(settingSection):
    try:
        settingsJSON = open("settings.json", "r")
    except FileNotFoundError:
       exception("settings.json not found make sure it exists in this folder")

    settings = json.load(settingsJSON)
    settingsJSON.close()

    return settings[settingSection]