Skip to content

Commit

Permalink
fix: Use ConfigParser and not SafeConfigParser
Browse files Browse the repository at this point in the history
* Card ID: CCT-263
* The SafeConfigParser was deprecated in Python 3.2. This class
  was renamed to ConfigParser
  • Loading branch information
jirihnidek committed Jan 18, 2024
1 parent 8837211 commit 14bd3c7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions virtwho/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import uuid
import requests

from configparser import SafeConfigParser
from configparser import ConfigParser
from configparser import DuplicateOptionError, NoOptionError, Error, MissingSectionHeaderError

from virtwho import log, SAT5, SAT6
Expand Down Expand Up @@ -236,10 +236,10 @@ class DefaultDestinationInfo(Info):
default_destination_info.name = "default_destination"


class StripQuotesConfigParser(SafeConfigParser):
class StripQuotesConfigParser(ConfigParser):
def get(self, section, option, **kwargs):
# Don't call super, SafeConfigParser is not inherited from object
value = SafeConfigParser.get(self, section, option, **kwargs)
# Don't call super, ConfigParser is not inherited from object
value = ConfigParser.get(self, section, option, **kwargs)
for quote in ('"', "'"):
# Strip the quotes only when the value starts with quote,
# ends with quote but doesn't contain it inside
Expand Down

0 comments on commit 14bd3c7

Please sign in to comment.