Skip to content

Commit d5187bf

Browse files
committed
Fixing #5
1 parent d2992d3 commit d5187bf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

api/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Other functions that are shared across modules are present as well.
33
'''
44
import config
5+
from imp import reload
56
backend = getattr(__import__('backends.%s' % config.backend), config.backend)
67

78
def get_config_str(cat, name):
@@ -16,6 +17,9 @@ def get_config_float(cat, name):
1617
def get_config_bool(cat, name):
1718
'''Get a boolean value out of the bot's configuration file'''
1819
return config.c.getboolean(cat, name)
20+
def reload_config():
21+
"""Reload the configuration file."""
22+
config = reload(config)
1923
def get_host(data):
2024
'''Returns the hostname (IP address) of the person who
2125
sent the message passed to the variable data

0 commit comments

Comments
 (0)