diff options
| author | Ryan Lane <laner@controller> | 2010-12-07 23:53:01 +0000 |
|---|---|---|
| committer | Ryan Lane <laner@controller> | 2010-12-07 23:53:01 +0000 |
| commit | 45324fc9f15135437051eaaedda68a5ef1f0da7a (patch) | |
| tree | c69eeb315aa9663b65d7b035305455272878d48a /nova | |
| parent | 17fd38e3cb277d51dcf9297178879a620623a855 (diff) | |
Raising an exception if the user doesn't exist before trying to modify its attributes
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/auth/ldapdriver.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nova/auth/ldapdriver.py b/nova/auth/ldapdriver.py index d54a0dfa6..5727c8da3 100644 --- a/nova/auth/ldapdriver.py +++ b/nova/auth/ldapdriver.py @@ -158,6 +158,8 @@ class LdapDriver(object): [str(is_admin).upper()])) self.conn.modify_s(self.__uid_to_dn(name), attr) return self.get_user(name) + else: + raise exception.NotFound("User %s doesn't exist" % name) else: attr = [ ('objectclass', ['person', |
