summaryrefslogtreecommitdiffstats
path: root/nova/adminclient.py
diff options
context:
space:
mode:
authorArmando Migliaccio <armando.migliaccio@citrix.com>2011-03-28 22:04:52 +0100
committerArmando Migliaccio <armando.migliaccio@citrix.com>2011-03-28 22:04:52 +0100
commit30ad1f72b2e71fa81b71f88b2abd9a23a1d2ed10 (patch)
tree853545b6aa0e76a2c7139cf927f3703b21ecc298 /nova/adminclient.py
parentc1ed5fc3dfeecef281df45cd2e6779fa21c63bf5 (diff)
parent848c8212a4c9c53f0e2a6b4154fb9504b95db060 (diff)
merge 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."""