Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Deprecated SafeConfigParser resolved #1949

Merged
merged 4 commits into from
Nov 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mackup/appsdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(self):
self.apps = dict()

for config_file in ApplicationsDatabase.get_config_files():
config = configparser.SafeConfigParser(allow_no_value=True)
config = configparser.ConfigParser(allow_no_value=True)

# Needed to not lowercase the configuration_files in the ini files
config.optionxform = str
Expand Down
4 changes: 2 additions & 2 deletions mackup/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,15 @@ def _setup_parser(self, filename=None):
filename (str) or None

Returns:
SafeConfigParser
ConfigParser
"""
assert isinstance(filename, str) or filename is None

# If we are not overriding the config filename
if not filename:
filename = MACKUP_CONFIG_FILE

parser = configparser.SafeConfigParser(
parser = configparser.ConfigParser(
allow_no_value=True, inline_comment_prefixes=(";", "#")
)
parser.read(os.path.join(os.path.join(os.environ["HOME"], filename)))
Expand Down
Loading