Skip to content

Commit

Permalink
zulip: Fix deprecation warnings for SafeConfigParser and readfp.
Browse files Browse the repository at this point in the history
SafeConfigParser has been renamed to ConfigParser and the method
SafeConfigParser.readfp() is now named ConfigParser.read_file().
  • Loading branch information
eeshangarg authored and timabbott committed Feb 28, 2022
1 parent 7c3967f commit e6dff1b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zulip/zulip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import traceback
import types
import urllib.parse
from configparser import SafeConfigParser
from configparser import ConfigParser
from typing import (
IO,
Any,
Expand Down Expand Up @@ -425,9 +425,9 @@ def __init__(
config_file = get_default_config_filename()

if config_file is not None and os.path.exists(config_file):
config = SafeConfigParser()
config = ConfigParser()
with open(config_file) as f:
config.readfp(f, config_file)
config.read_file(f, config_file)
if api_key is None:
api_key = config.get("api", "key")
if email is None:
Expand Down

0 comments on commit e6dff1b

Please sign in to comment.