summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2009-02-19 17:12:01 -0500
committerRob Crittenden <rcritten@redhat.com>2009-02-20 10:40:50 -0500
commitb53edad2546315e087e88b6ae3f49e8a861517f7 (patch)
tree968915fbda11805254a0bd494eaf610ac32e85e3
parent1a8ec58602504427679784c5576522c137481e38 (diff)
downloadfreeipa-b53edad2546315e087e88b6ae3f49e8a861517f7.tar.gz
freeipa-b53edad2546315e087e88b6ae3f49e8a861517f7.tar.xz
freeipa-b53edad2546315e087e88b6ae3f49e8a861517f7.zip
raise exceptions in the proper form
-rw-r--r--ipalib/plugins/f_passwd.py2
-rw-r--r--ipalib/plugins/f_user.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/ipalib/plugins/f_passwd.py b/ipalib/plugins/f_passwd.py
index 739e6d5b..a599276f 100644
--- a/ipalib/plugins/f_passwd.py
+++ b/ipalib/plugins/f_passwd.py
@@ -54,7 +54,7 @@ class passwd(Command):
if principal.find('@') > 0:
u = principal.split('@')
if len(u) > 2:
- raise errors.InvalidUserPrincipal, principal
+ raise errors.InvalidUserPrincipal(principal)
else:
principal = principal+"@"+self.api.env.realm
dn = self.Backend.ldap.find_entry_dn(
diff --git a/ipalib/plugins/f_user.py b/ipalib/plugins/f_user.py
index 13bc5cd0..e4e1cdaf 100644
--- a/ipalib/plugins/f_user.py
+++ b/ipalib/plugins/f_user.py
@@ -160,7 +160,7 @@ class user_add(crud.Create):
kw['gidnumber'] = default_group.get('gidnumber')
except errors2.NotFound:
# Fake an LDAP error so we can return something useful to the kw
- raise errors2.NotFound, "The default group for new users, '%s', cannot be found." % config.get('ipadefaultprimarygroup')
+ raise errors2.NotFound("The default group for new users, '%s', cannot be found." % config.get('ipadefaultprimarygroup'))
except Exception, e:
# catch everything else
raise e