Skip to content

Commit

Permalink
Replace deprecated SafeConfigParser with ConfigParser
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Dec 12, 2021
1 parent 4c234f6 commit eb4d5a2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests3/testutils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os, sys, platform
from os.path import join, dirname, abspath, basename
from os.path import join, dirname, abspath
import unittest
from distutils.util import get_platform

Expand Down Expand Up @@ -87,8 +87,8 @@ def load_setup_connection_string(section):
If the file does not exist or if it exists but does not contain the connection string, None is returned. If the
file exists but cannot be parsed, an exception is raised.
"""
from os.path import exists, join, dirname, splitext, basename
from configparser import SafeConfigParser
from os.path import exists, join, dirname
from configparser import ConfigParser

FILENAME = 'setup.cfg'
KEY = 'connection-string'
Expand All @@ -105,7 +105,7 @@ def load_setup_connection_string(section):
path = parent

try:
p = SafeConfigParser()
p = ConfigParser()
p.read(fqn)
except:
raise SystemExit('Unable to parse %s: %s' % (path, sys.exc_info()[1]))
Expand Down

0 comments on commit eb4d5a2

Please sign in to comment.