summaryrefslogtreecommitdiff
path: root/voctocore/lib/config.py
diff options
context:
space:
mode:
authorFlorian Zeitz <florob@babelmonkeys.de>2016-09-15 22:55:36 +0200
committerFlorian Zeitz <florob@babelmonkeys.de>2016-09-15 22:55:36 +0200
commit9ffea4ad9ef0f0b23e5b4e5ebbfe5f140ecf5450 (patch)
tree54b1279870df9ce4fa828373d35d879e8ef431d7 /voctocore/lib/config.py
parent746d75dee7fb6291a900e0162345354e6eb41c13 (diff)
voctocore: pep8ify
* Indent by 4 spaces * Reformat some argument lists * Two newlines before free functions * One newline before methods * Spaces around infix operators
Diffstat (limited to 'voctocore/lib/config.py')
-rw-r--r--voctocore/lib/config.py25
1 files changed, 14 insertions, 11 deletions
diff --git a/voctocore/lib/config.py b/voctocore/lib/config.py
index df0ff9a..388778e 100644
--- a/voctocore/lib/config.py
+++ b/voctocore/lib/config.py
@@ -5,29 +5,32 @@ from lib.args import Args
__all__ = ['Config']
+
def getlist(self, section, option):
- return [x.strip() for x in self.get(section, option).split(',')]
+ return [x.strip() for x in self.get(section, option).split(',')]
SafeConfigParser.getlist = getlist
files = [
- os.path.join(os.path.dirname(os.path.realpath(__file__)), '../default-config.ini'),
- os.path.join(os.path.dirname(os.path.realpath(__file__)), '../config.ini'),
- '/etc/voctomix/voctocore.ini',
- '/etc/voctomix.ini', # deprecated
- '/etc/voctocore.ini',
- os.path.expanduser('~/.voctomix.ini'), # deprecated
- os.path.expanduser('~/.voctocore.ini'),
+ os.path.join(os.path.dirname(os.path.realpath(__file__)),
+ '../default-config.ini'),
+ os.path.join(os.path.dirname(os.path.realpath(__file__)),
+ '../config.ini'),
+ '/etc/voctomix/voctocore.ini',
+ '/etc/voctomix.ini', # deprecated
+ '/etc/voctocore.ini',
+ os.path.expanduser('~/.voctomix.ini'), # deprecated
+ os.path.expanduser('~/.voctocore.ini'),
]
if Args.ini_file is not None:
- files.append(Args.ini_file)
+ files.append(Args.ini_file)
Config = SafeConfigParser()
readfiles = Config.read(files)
log = logging.getLogger('ConfigParser')
log.debug('considered config-files: \n%s',
- "\n".join(["\t\t"+os.path.normpath(file) for file in files]) )
+ "\n".join(["\t\t" + os.path.normpath(file) for file in files]))
log.debug('successfully parsed config-files: \n%s',
- "\n".join(["\t\t"+os.path.normpath(file) for file in readfiles]) )
+ "\n".join(["\t\t" + os.path.normpath(file) for file in readfiles]))