From 1c31b5bc08a2f4bc55678c69eb67508122480906 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Fri, 8 May 2009 11:15:45 -0400 Subject: Add a reason to the NotFound exception so we can provide more robust errors --- ipalib/plugins/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipalib/plugins/user.py') diff --git a/ipalib/plugins/user.py b/ipalib/plugins/user.py index b14136d1..6fad325f 100644 --- a/ipalib/plugins/user.py +++ b/ipalib/plugins/user.py @@ -160,7 +160,7 @@ class user_add(crud.Create): kw['gidnumber'] = default_group.get('gidnumber') except errors.NotFound: # Fake an LDAP error so we can return something useful to the kw - raise errors.NotFound("The default group for new users, '%s', cannot be found." % config.get('ipadefaultprimarygroup')) + raise errors.NotFound(reason="The default group for new users, '%s', cannot be found." % config.get('ipadefaultprimarygroup')) except Exception, e: # catch everything else raise e -- cgit