Skip to content

Commit

Permalink
fix: Deprecated SafeConfigParser resolved (#1949)
Browse files Browse the repository at this point in the history
* fix: Update config.py

#1948

* fix: Update appsdb.py

#1948

---------

Co-authored-by: Laurent Raufaste <[email protected]>
  • Loading branch information
vincentkoc and lra committed Nov 4, 2023
1 parent 3b8dc53 commit 1797037
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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

0 comments on commit 1797037

Please sign in to comment.