mirror of
https://github.com/nichkara/InfinitumBotty.git
synced 2026-06-10 22:26:23 +02:00
Config.py: remove unnessary manual newline remove (strip does that), split each config.txt line only once, so that : works in values.
This commit is contained in:
@@ -26,9 +26,9 @@ class Config(object):
|
||||
if not append:
|
||||
self._config_dict = {}
|
||||
for l in f.readlines():
|
||||
kv_pair = l.split(':')
|
||||
kv_pair = l.split(':', 1)
|
||||
if len(kv_pair) == 2:
|
||||
self._config_dict[kv_pair[0].strip()] = kv_pair[1][:-1].strip()
|
||||
self._config_dict[kv_pair[0].strip()] = kv_pair[1].strip()
|
||||
mods = self._config_dict['mods'].split(',')
|
||||
self._config_dict['mods'] = []
|
||||
for mod in mods:
|
||||
@@ -86,4 +86,4 @@ class Config(object):
|
||||
|
||||
@property
|
||||
def first_greeting(self):
|
||||
return self._config_dict['first_greeting']
|
||||
return self._config_dict['first_greeting']
|
||||
|
||||
Reference in New Issue
Block a user