mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-12 22:49:53 -05:00
test setting up complete config
This commit is contained in:
parent
72edc5f33c
commit
663f7f3182
@ -2,6 +2,7 @@
|
|||||||
from __future__ import unicode_literals, absolute_import, division, print_function
|
from __future__ import unicode_literals, absolute_import, division, print_function
|
||||||
"""A way to read the bot's config without bot"""
|
"""A way to read the bot's config without bot"""
|
||||||
|
|
||||||
|
import sopel.config
|
||||||
from sopel.cli.run import build_parser, get_configuration
|
from sopel.cli.run import build_parser, get_configuration
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
@ -25,6 +26,9 @@ class BotConfig():
|
|||||||
# Filename
|
# Filename
|
||||||
self.filename = self.config.filename
|
self.filename = self.config.filename
|
||||||
|
|
||||||
|
# load Sopel config fully
|
||||||
|
sopel.config.Config(self.config.filename)
|
||||||
|
|
||||||
# load as dict
|
# load as dict
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
config.read(self.filename)
|
config.read(self.filename)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user