diff options
author | Florian Zeitz <florob@babelmonkeys.de> | 2016-09-15 09:08:36 +0200 |
---|---|---|
committer | Florian Zeitz <florob@babelmonkeys.de> | 2016-09-15 22:55:24 +0200 |
commit | 746d75dee7fb6291a900e0162345354e6eb41c13 (patch) | |
tree | 8837a57482ccecebb44a4e9030804654c9526a92 /voctogui/lib/config.py | |
parent | 27f9bb1c2aeebae5c1482d9b5f33e990f6cfb68b (diff) |
voctogui: pep8ify
* Indent by 4 spaces
* Use spaces around infix operators
* Reformat some argument lists
* One import per line
* Start line comments with '# '
* Two newlines before free functions
* One newline before methods
Diffstat (limited to 'voctogui/lib/config.py')
-rw-r--r-- | voctogui/lib/config.py | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/voctogui/lib/config.py b/voctogui/lib/config.py index d4630bf..dc7c561 100644 --- a/voctogui/lib/config.py +++ b/voctogui/lib/config.py @@ -7,31 +7,35 @@ import lib.connection as Connection __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(',')] + def fetchServerConfig(self): - log = logging.getLogger('Config') - log.info("reading server-config") + log = logging.getLogger('Config') + log.info("reading server-config") - server_config = Connection.fetchServerConfig() + server_config = Connection.fetchServerConfig() - log.info("merging server-config %s", server_config) - self.read_dict(server_config) + log.info("merging server-config %s", server_config) + self.read_dict(server_config) SafeConfigParser.getlist = getlist SafeConfigParser.fetchServerConfig = fetchServerConfig 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/voctogui.ini', - '/etc/voctogui.ini', - os.path.expanduser('~/.voctogui.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/voctogui.ini', + '/etc/voctogui.ini', + os.path.expanduser('~/.voctogui.ini'), ] if Args.ini_file is not None: - files.append(Args.ini_file) + files.append(Args.ini_file) Config = SafeConfigParser() Config.read(files) |