URL: https://github.com/freeipa/freeipa/pull/1069 Author: stlaz Title: #1069: [Backport][ipa-4-6] uninstall: remove deprecation warning Action: opened
PR body: """ This PR was opened automatically because PR #1054 was pushed to master and backport to ipa-4-6 is required. """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/1069/head:pr1069 git checkout pr1069
From c0feac40b8e2c1cc036bcc3abbfacc9bbee98345 Mon Sep 17 00:00:00 2001 From: Stanislav Laznicka <slazn...@redhat.com> Date: Fri, 8 Sep 2017 12:51:21 +0200 Subject: [PATCH] uninstall: remove deprecation warning RawConfigParser.readfp() method is deprecated and throws DeprecationWarning in python 3 during uninstall. https://pagure.io/freeipa/issue/7131 --- ipaclient/install/client.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ipaclient/install/client.py b/ipaclient/install/client.py index b7293bb29f..e971aeab48 100644 --- a/ipaclient/install/client.py +++ b/ipaclient/install/client.py @@ -3105,9 +3105,7 @@ def uninstall(options): "Removing Kerberos service principals from /etc/krb5.keytab") try: parser = RawConfigParser() - fp = open(paths.IPA_DEFAULT_CONF, 'r') - parser.readfp(fp) - fp.close() + parser.read(paths.IPA_DEFAULT_CONF) realm = parser.get('global', 'realm') run([paths.IPA_RMKEYTAB, "-k", paths.KRB5_KEYTAB, "-r", realm]) except CalledProcessError as err:
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org