mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Use six.moves.configparser instead of ConfigParser
The module name was lowercased in Python 3. Reviewed-By: David Kupka <dkupka@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
committed by
Jan Cholasta
parent
ad2bc94725
commit
187efdfe42
@@ -21,10 +21,10 @@ import collections
|
||||
import os
|
||||
import httplib
|
||||
import xml.dom.minidom
|
||||
import ConfigParser
|
||||
|
||||
import nss.nss as nss
|
||||
import six
|
||||
from six.moves import configparser
|
||||
from six.moves.urllib.parse import urlencode
|
||||
|
||||
from ipalib import api, errors
|
||||
@@ -143,11 +143,11 @@ def _get_configured_version(api):
|
||||
if api:
|
||||
return int(api.env.dogtag_version)
|
||||
else:
|
||||
p = ConfigParser.SafeConfigParser()
|
||||
p = configparser.SafeConfigParser()
|
||||
p.read(paths.IPA_DEFAULT_CONF)
|
||||
try:
|
||||
version = p.get('global', 'dogtag_version')
|
||||
except (ConfigParser.NoOptionError, ConfigParser.NoSectionError):
|
||||
except (configparser.NoOptionError, configparser.NoSectionError):
|
||||
return 9
|
||||
else:
|
||||
return int(version)
|
||||
|
||||
Reference in New Issue
Block a user