mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
uninstall: remove deprecation warning
RawConfigParser.readfp() method is deprecated and throws DeprecationWarning in python 3 during uninstall. https://pagure.io/freeipa/issue/7131 Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
This commit is contained in:
parent
0f13e663ca
commit
be9da19de3
@ -3105,9 +3105,7 @@ def uninstall(options):
|
|||||||
"Removing Kerberos service principals from /etc/krb5.keytab")
|
"Removing Kerberos service principals from /etc/krb5.keytab")
|
||||||
try:
|
try:
|
||||||
parser = RawConfigParser()
|
parser = RawConfigParser()
|
||||||
fp = open(paths.IPA_DEFAULT_CONF, 'r')
|
parser.read(paths.IPA_DEFAULT_CONF)
|
||||||
parser.readfp(fp)
|
|
||||||
fp.close()
|
|
||||||
realm = parser.get('global', 'realm')
|
realm = parser.get('global', 'realm')
|
||||||
run([paths.IPA_RMKEYTAB, "-k", paths.KRB5_KEYTAB, "-r", realm])
|
run([paths.IPA_RMKEYTAB, "-k", paths.KRB5_KEYTAB, "-r", realm])
|
||||||
except CalledProcessError as err:
|
except CalledProcessError as err:
|
||||||
|
Loading…
Reference in New Issue
Block a user