bots: Fix errors to get info from config file to run bots.
get_config_info function in 'ExternalBotHandler' class was
using 2 undefined variables, which wasn't allowing bots to
access information from config file.
Fixed it, bots with api key working now.
MODIFY
zulip_bots/zulip_bots/lib.py
zulip_bots/zulip_bots/lib.py
@@ -92,11 +92,11 @@ class ExternalBotHandler(object):
def get_config_info(self, bot_name, section=None, optional=False):
# type: (str, Optional[str], Optional[bool]) -> Dict[str, Any]
conf_file_path = os.path.realpath(os.path.join(
- our_dir, 'bots', bot_name, bot_name + '.conf'))
+ 'zulip_bots', 'bots', bot_name, bot_name + '.conf'))
section = section or bot_name
config = configparser.ConfigParser()
try:
- with open(config_file_path) as conf:
+ with open(conf_file_path) as conf:
config.readfp(conf) # type: ignore
except IOError:
if optional:

bots: Fix errors to get info from config file to run bots.

get_config_info function in 'ExternalBotHandler' class was
using 2 undefined variables, which wasn't allowing bots to
access information from config file.
Fixed it, bots with api key working now.