ipa/freeipa-3.0.0.pre1-031-ipalib-plugins-trust.py-validationerror-takes-error-.patch
2012-08-06 18:17:49 +02:00

44 lines
2.2 KiB
Diff

From 2d75d8cc055887f354db947aac1d33e961e9c80c Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <abokovoy@redhat.com>
Date: Mon, 16 Jul 2012 12:43:47 +0300
Subject: [PATCH 31/79] ipalib/plugins/trust.py: ValidationError takes 'error'
named argument, not 'reason'
https://fedorahosted.org/freeipa/ticket/2865
---
ipalib/plugins/trust.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ipalib/plugins/trust.py b/ipalib/plugins/trust.py
index 40bd93e654c0365ad202abfd82e84345583459dd..2932835e038d99d9c48f1822e76fbc2e1570f92f 100644
--- a/ipalib/plugins/trust.py
+++ b/ipalib/plugins/trust.py
@@ -182,13 +182,13 @@ class trust_add(LDAPCreate):
realm_admin = options['realm_admin']
if 'realm_passwd' not in options:
- raise errors.ValidationError(name=_('AD Trust setup'), reason=_('Realm administrator password should be specified'))
+ raise errors.ValidationError(name=_('AD Trust setup'), error=_('Realm administrator password should be specified'))
realm_passwd = options['realm_passwd']
result = trustinstance.join_ad_full_credentials(keys[-1], realm_server, realm_admin, realm_passwd)
if result is None:
- raise errors.ValidationError(name=_('AD Trust setup'), reason=_('Unable to verify write permissions to the AD'))
+ raise errors.ValidationError(name=_('AD Trust setup'), error=_('Unable to verify write permissions to the AD'))
return dict(result=dict(), value=trustinstance.remote_domain.info['dns_domain'])
@@ -198,7 +198,7 @@ class trust_add(LDAPCreate):
if 'trust_secret' in options:
result = trustinstance.join_ad_ipa_half(keys[-1], realm_server, options['trust_secret'])
return dict(result=dict(), value=trustinstance.remote_domain.info['dns_domain'])
- raise errors.ValidationError(name=_('AD Trust setup'), reason=_('Not enough arguments specified to perform trust setup'))
+ raise errors.ValidationError(name=_('AD Trust setup'), error=_('Not enough arguments specified to perform trust setup'))
class trust_del(LDAPDelete):
__doc__ = _('Delete a trust.')
--
1.7.11.2