kumistatus/setuptools.py
2016-03-16 13:52:26 +01:00

11 lines
297 B
Python

import configparser
class SetupException(Exception):
def __str__(self):
return "Seems like config.cfg has not been created yet. Run setup.py to do so."
def getSetting(section, setting):
config = configparser.RawConfigParser()
config.read('config.cfg')
return config.get(section, setting)