mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-10 21:50:59 -05:00
fix
This commit is contained in:
parent
155afcb25e
commit
64be7e4a6f
@ -17,17 +17,17 @@ class BotConfig():
|
||||
def load_config(self):
|
||||
|
||||
# Load config
|
||||
parser = build_parser()
|
||||
if not len(sys.argv[1:]):
|
||||
argv = ['legacy']
|
||||
else:
|
||||
argv = sys.argv[1:]
|
||||
parser = build_parser()
|
||||
opts = parser.parse_args(argv)
|
||||
config_module = get_configuration(opts)
|
||||
|
||||
# load dict
|
||||
config = configparser.ConfigParser()
|
||||
config.read(self.config.filename)
|
||||
config.read(config_module.filename)
|
||||
for each_section in config.sections():
|
||||
if each_section not in self.dict.keys():
|
||||
self.dict[each_section] = dict()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user