blob: 9201f3e1630f3186532edc579d5d608a9e3c0bd5 (
plain)
- #!/usr/bin/python3
- import os.path
- from configparser import SafeConfigParser
- from lib.args import Args
- __all__ = ['Config']
- def getlist(self, section, option):
- return [x.strip() for x in self.get(section, option).split(',')]
- SafeConfigParser.getlist = getlist
- files = [
- 'default-config.ini',
- '/etc/voctomix.ini',
- os.path.expanduser('~/.voctomix.ini'),
- ]
- if Args.ini_file is not None:
- files.append(Args.ini_file)
- Config = SafeConfigParser()
- Config.read(files)
|