mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-10 21:50:59 -05:00
test
This commit is contained in:
parent
20c03fcab2
commit
8c322c2183
@ -12,8 +12,9 @@ class BotConfig():
|
||||
|
||||
def __init__(self):
|
||||
self.dict = {}
|
||||
self.config = None
|
||||
self.filename = None
|
||||
self.config = self.load_config()
|
||||
self.load_config()
|
||||
|
||||
def load_config(self):
|
||||
|
||||
@ -24,16 +25,14 @@ class BotConfig():
|
||||
else:
|
||||
argv = sys.argv[1:]
|
||||
opts = parser.parse_args(argv)
|
||||
config_module = get_configuration(opts)
|
||||
self.config = get_configuration(opts)
|
||||
|
||||
# Filename
|
||||
self.filename = config_module.filename
|
||||
self.filename = self.config.filename
|
||||
|
||||
# load as dict
|
||||
self.dict = self.config_file_to_dict()
|
||||
|
||||
return config_module
|
||||
|
||||
def config_file_to_dict(self):
|
||||
configdict = dict()
|
||||
config = configparser.ConfigParser()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user