summaryrefslogtreecommitdiffstats
path: root/nova/adminclient.py
diff options
context:
space:
mode:
authorJohn Tran <jtran@attinteractive.com>2011-03-28 12:24:36 -0700
committerJohn Tran <jtran@attinteractive.com>2011-03-28 12:24:36 -0700
commitc6a9bade80d44c0576f30608d33a1e5cbcd577e0 (patch)
treeeb8439e19e67161c7717a69316c13bab0f3f2468 /nova/adminclient.py
parent9ce24afab007a9b5144c8c8a8f2fcc4157ba34d7 (diff)
parentddbb00fc3c3a2fe74234298a206d2e6a91513a33 (diff)
merged from trunk
Diffstat (limited to 'nova/adminclient.py')
-rw-r--r--nova/adminclient.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/nova/adminclient.py b/nova/adminclient.py
index fc3c5c5fe..f570e12c2 100644
--- a/nova/adminclient.py
+++ b/nova/adminclient.py
@@ -324,14 +324,11 @@ class NovaAdminClient(object):
def get_user(self, name):
"""Grab a single user by name."""
- try:
- return self.apiconn.get_object('DescribeUser',
- {'Name': name},
- UserInfo)
- except boto.exception.BotoServerError, e:
- if e.status == 400 and e.error_code == 'NotFound':
- return None
- raise
+ user = self.apiconn.get_object('DescribeUser',
+ {'Name': name},
+ UserInfo)
+ if user.username != None:
+ return user
def has_user(self, username):
"""Determine if user exists."""