summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorRyan Lane <laner@controller>2010-12-07 23:53:01 +0000
committerRyan Lane <laner@controller>2010-12-07 23:53:01 +0000
commit45324fc9f15135437051eaaedda68a5ef1f0da7a (patch)
treec69eeb315aa9663b65d7b035305455272878d48a /nova
parent17fd38e3cb277d51dcf9297178879a620623a855 (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.py2
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',