Skip to content

Commit

Permalink
Merge pull request #52 from pawamoy/patch-1
Browse files Browse the repository at this point in the history
Use ConfigParser directly

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
  • Loading branch information
pombredanne committed Jan 5, 2022
2 parents 1d0fe72 + 796af29 commit 699069e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dparse/parser.py
Expand Up @@ -6,7 +6,7 @@

from io import StringIO

from configparser import SafeConfigParser, NoOptionError
from configparser import ConfigParser, NoOptionError


from .regex import URL_REGEX, HASH_REGEX
Expand Down Expand Up @@ -274,7 +274,7 @@ def parse(self):
:return:
"""
parser = SafeConfigParser()
parser = ConfigParser()
parser.readfp(StringIO(self.obj.content))
for section in parser.sections():
try:
Expand Down Expand Up @@ -379,7 +379,7 @@ def parse(self):

class SetupCfgParser(Parser):
def parse(self):
parser = SafeConfigParser()
parser = ConfigParser()
parser.readfp(StringIO(self.obj.content))
for section in parser.values():
if section.name == 'options':
Expand Down

0 comments on commit 699069e

Please sign in to comment.