mirror of
https://github.com/zulip/zulip.git
synced 2025-10-28 02:23:57 +00:00
bot_config: Avoid deprecated ConfigParser.readfp method.
Fixes this warning with python -Wd: /home/circleci/zulip/zerver/lib/bot_config.py:69: DeprecationWarning: This method will be removed in future versions. Use 'parser.read_file()' instead. config.readfp(conf) https://docs.python.org/3/library/configparser.html#configparser.ConfigParser.readfp Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
95f29b5409
commit
b94b350ff0
@@ -66,7 +66,7 @@ def load_bot_config_template(bot: str) -> Dict[str, str]:
|
||||
if os.path.isfile(config_path):
|
||||
config = configparser.ConfigParser()
|
||||
with open(config_path) as conf:
|
||||
config.readfp(conf)
|
||||
config.read_file(conf)
|
||||
return dict(config.items(bot))
|
||||
else:
|
||||
return dict()
|
||||
|
||||
Reference in New Issue
Block a user