URL: https://github.com/freeipa/freeipa/pull/2182
Author: t-woerner
 Title: #2182: 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.
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/2182/head:pr2182
git checkout pr2182
From 5545b7f6172b87b0539234a64ea1eaf61c9ee517 Mon Sep 17 00:00:00 2001
From: Thomas Woerner <twoer...@redhat.com>
Date: Tue, 24 Jul 2018 17:18: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.
---
 ipaserver/plugins/cert.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipaserver/plugins/cert.py b/ipaserver/plugins/cert.py
index 8d43b9f468..a698991b5b 100644
--- a/ipaserver/plugins/cert.py
+++ b/ipaserver/plugins/cert.py
@@ -301,7 +301,7 @@ 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/NC3ZZTA72QOVQM57P4Z4LAZJ5QUMFMLV/

Reply via email to