Update ConfigParser usage for Py3
SafeConfigParser is now just ConfigParser
This commit is contained in:
parent
28b6b8d296
commit
1d6d145854
@ -15,7 +15,7 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
import os
|
import os
|
||||||
from ConfigParser import SafeConfigParser, NoOptionError
|
from configparser import ConfigParser, NoOptionError
|
||||||
from glob import glob
|
from glob import glob
|
||||||
import shutil
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
@ -39,7 +39,7 @@ def get_system_repo():
|
|||||||
"""
|
"""
|
||||||
# The sources delete test needs the name of a system repo, get it from /etc/yum.repos.d/
|
# The sources delete test needs the name of a system repo, get it from /etc/yum.repos.d/
|
||||||
for sys_repo in sorted(glob("/etc/yum.repos.d/*repo")):
|
for sys_repo in sorted(glob("/etc/yum.repos.d/*repo")):
|
||||||
cfg = SafeConfigParser()
|
cfg = ConfigParser()
|
||||||
cfg.read(sys_repo)
|
cfg.read(sys_repo)
|
||||||
for section in cfg.sections():
|
for section in cfg.sections():
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user