mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 06:59:53 -05:00
fix filename issue
This commit is contained in:
parent
b6f3b363e5
commit
26f39f8f11
@ -34,7 +34,7 @@ class BotConfig():
|
|||||||
|
|
||||||
# load as dict
|
# load as dict
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
config.read(self.filename)
|
config.read(self.config.filename)
|
||||||
for each_section in config.sections():
|
for each_section in config.sections():
|
||||||
if each_section.lower() not in self.dict.keys():
|
if each_section.lower() not in self.dict.keys():
|
||||||
self.dict[each_section.lower()] = dict()
|
self.dict[each_section.lower()] = dict()
|
||||||
@ -50,8 +50,8 @@ class BotConfig():
|
|||||||
"""We will try to find a core value, or return None"""
|
"""We will try to find a core value, or return None"""
|
||||||
if hasattr(self.config.core, name):
|
if hasattr(self.config.core, name):
|
||||||
return eval("self.config.core." + name)
|
return eval("self.config.core." + name)
|
||||||
# elif name.lower() in self.dict["core"].keys():
|
elif name.lower() in self.dict["core"].keys():
|
||||||
# return self.dict["core"][str(name).lower()]
|
return self.dict["core"][str(name).lower()]
|
||||||
elif hasattr(self.config, name):
|
elif hasattr(self.config, name):
|
||||||
return eval("self.config." + name)
|
return eval("self.config." + name)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user