summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2016-05-18 10:03:39 +0200
committerJan Cholasta <jcholast@redhat.com>2016-05-25 16:06:26 +0200
commit2f6b333187e150369e9f761520aaebca0b45c011 (patch)
treeae02eeb7cd0d3bcfbaf78cebd5b938d9d14c8488 /ipalib/plugins
parente0275abe6f5192e68b7f57acf37b01aaa89003ea (diff)
downloadfreeipa-2f6b333187e150369e9f761520aaebca0b45c011.tar.gz
freeipa-2f6b333187e150369e9f761520aaebca0b45c011.tar.xz
freeipa-2f6b333187e150369e9f761520aaebca0b45c011.zip
frontend: re-raise remote RequirementError using CLI name in CLI
https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipalib/plugins')
-rw-r--r--ipalib/plugins/group.py4
-rw-r--r--ipalib/plugins/trust.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/ipalib/plugins/group.py b/ipalib/plugins/group.py
index 85ed1d2b0..b9d38592a 100644
--- a/ipalib/plugins/group.py
+++ b/ipalib/plugins/group.py
@@ -413,7 +413,7 @@ class group_mod(LDAPUpdate):
# Can't check for this in a validator because we lack context
if 'gidnumber' in options and options['gidnumber'] is None:
- raise errors.RequirementError(name='gid')
+ raise errors.RequirementError(name='gidnumber')
return dn
def exc_callback(self, keys, options, exc, call_func, *call_args, **call_kwargs):
@@ -422,7 +422,7 @@ class group_mod(LDAPUpdate):
if call_func.__name__ == 'update_entry':
if isinstance(exc, errors.ObjectclassViolation):
if 'gidNumber' in exc.message and 'posixGroup' in exc.message:
- raise errors.RequirementError(name='gid')
+ raise errors.RequirementError(name='gidnumber')
raise exc
diff --git a/ipalib/plugins/trust.py b/ipalib/plugins/trust.py
index 6d6ac6096..44049aeb3 100644
--- a/ipalib/plugins/trust.py
+++ b/ipalib/plugins/trust.py
@@ -787,7 +787,7 @@ sides.
)
if 'trust_type' not in options:
- raise errors.RequirementError(name=_('trust type'))
+ raise errors.RequirementError(name='trust_type')
if options['trust_type'] != u'ad':
raise errors.ValidationError(