From 71ba408d61839233081a0694e3cdf8d829255b7b Mon Sep 17 00:00:00 2001 From: Thomas Woerner Date: Fri, 27 Jul 2018 12:15:17 +0200 Subject: [PATCH] ipaserver/plugins/cert.py: Added reason to raise of errors.NotFound In the case that enabledService is not found ipaConfigString kdc entry, a NotFound error was raised without setting the reason. This resulted in a traceback. Fixes: https://pagure.io/freeipa/issue/7652 Reviewed-By: Rob Crittenden --- ipaserver/plugins/cert.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ipaserver/plugins/cert.py b/ipaserver/plugins/cert.py index 8d43b9f46..ffe51597e 100644 --- a/ipaserver/plugins/cert.py +++ b/ipaserver/plugins/cert.py @@ -301,7 +301,8 @@ def ca_kdc_check(api_instance, hostname): ipaconfigstring = {val.lower() for val in kdc_entry['ipaConfigString']} if 'enabledservice' not in ipaconfigstring: - raise errors.NotFound() + raise errors.NotFound( + reason=_("enabledService not in ipaConfigString kdc entry")) except errors.NotFound: raise errors.ACIError(