URL: https://github.com/freeipa/freeipa/pull/489 Author: stlaz Title: #489: Fix error in ca_cert_files validator Action: opened
PR body: """ ClientInstall expects a single ca_cert_file as a string but the framework gives it a list. https://fedorahosted.org/freeipa/ticket/6694 """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/489/head:pr489 git checkout pr489
From 89df76e2fd31bd27e859820ae0dd9f981cffa27c Mon Sep 17 00:00:00 2001 From: Stanislav Laznicka <slazn...@redhat.com> Date: Tue, 21 Feb 2017 10:16:46 +0100 Subject: [PATCH] Fix error in ca_cert_files validator ClientInstall expects a single ca_cert_file as a string but the framework gives it a list. https://fedorahosted.org/freeipa/ticket/6694 --- ipaclient/install/client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ipaclient/install/client.py b/ipaclient/install/client.py index f951770..774eaaf 100644 --- a/ipaclient/install/client.py +++ b/ipaclient/install/client.py @@ -3555,6 +3555,10 @@ class ClientInstall(ClientInstallInterface, @ca_cert_files.validator def ca_cert_files(self, value): + if not isinstance(value, list): + raise ValueError("Expected list, got {!r}".format(value)) + # this is what init() does + value = value[-1] if not os.path.exists(value): raise ValueError("'%s' does not exist" % value) if not os.path.isfile(value):
-- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code