Inconsistent error message for duplicate user

When duplicate user is added an inconsistent error message to the rest
of the framework is printed. This patch changes this to standard
duplicate error message.

https://fedorahosted.org/freeipa/ticket/1116
This commit is contained in:
Martin Kosek authored and Rob Crittenden committed 2011-03-29 13:54:32 -04:00
1 parent b29bd47273
commit e7fda0652d
1 file changed
+1 -1
+1 -1
View File
@@ -261,7 +261,7 @@ class user_add(LDAPCreate):
self.api.Command['group_show'](keys[-1])
try:
self.api.Command['user_show'](keys[-1])
raise errors.DuplicateEntry()
self.obj.handle_duplicate_entry(*keys)
except errors.NotFound:
raise errors.ManagedGroupExistsError(group=keys[-1])
except errors.NotFound: