Produce better error in group-add command.

https://fedorahosted.org/freeipa/ticket/4611

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
David Kupka 2014-11-05 02:40:10 -05:00 committed by Jan Cholasta
parent e28eb13907
commit b032debd23

View File

@ -287,7 +287,7 @@ class group_add(LDAPCreate):
if options['external']:
entry_attrs['objectclass'].append('ipaexternalgroup')
if 'gidnumber' in options:
raise errors.RequirementError(name='gid')
raise errors.MutuallyExclusiveError(reason=_('gid cannot be set for external group'))
elif not options['nonposix']:
entry_attrs['objectclass'].append('posixgroup')
if not 'gidnumber' in options: