URL: https://github.com/freeipa/freeipa/pull/2187
Author: t-woerner
 Title: #2187: ipaserver/plugins/cert.py: Added reason to raise of 
errors.NotFound
Action: opened

PR body:
"""
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

Resubmit of: https://github.com/freeipa/freeipa/pull/2182
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/2187/head:pr2187
git checkout pr2187
From a49ea5d7e17e35809e1558b55dd54693551c8a1f Mon Sep 17 00:00:00 2001
From: Thomas Woerner <twoer...@redhat.com>
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
---
 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 8d43b9f468..ffe51597e4 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(
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/freeipa-devel@lists.fedorahosted.org/message/6HA7HJ6PJKZPUM7DE2QYEKGORITOVW2Q/

Reply via email to