14 lines
318 B
Python
14 lines
318 B
Python
import configparser
|
|
|
|
conffile = "config.cfg"
|
|
|
|
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(conffile)
|
|
return config.get(section, setting)
|
|
|