58 lines
2.0 KiB
Diff
58 lines
2.0 KiB
Diff
|
From 4b592fee24bf0180c84036b0db3abccc101b46c3 Mon Sep 17 00:00:00 2001
|
||
|
From: Thomas Woerner <twoerner@redhat.com>
|
||
|
Date: Tue, 24 Jul 2018 17:18:17 +0200
|
||
|
Subject: [PATCH 1/2] 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 8d43b9f46..a698991b5 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(
|
||
|
--
|
||
|
2.17.1
|
||
|
|
||
|
From 1a7baa2543cae6f3da1b9d674dbaeefdfc83c37a Mon Sep 17 00:00:00 2001
|
||
|
From: Thomas Woerner <twoerner@redhat.com>
|
||
|
Date: Wed, 25 Jul 2018 10:22:59 +0200
|
||
|
Subject: [PATCH 2/2] ipaserver/plugins/cert.py: Make the new reason for
|
||
|
errors.NotFound translatable
|
||
|
|
||
|
Related to: 5545b7f6172b87b0539234a64ea1eaf61c9ee517
|
||
|
---
|
||
|
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 a698991b5..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(reason="enabledService not in ipaConfigString kdc entry")
|
||
|
+ raise errors.NotFound(
|
||
|
+ reason=_("enabledService not in ipaConfigString kdc entry"))
|
||
|
|
||
|
except errors.NotFound:
|
||
|
raise errors.ACIError(
|
||
|
--
|
||
|
2.17.1
|
||
|
|