diff options
| author | Salvatore Orlando <salvatore.orlando@eu.citrix.com> | 2011-03-30 10:41:25 +0100 |
|---|---|---|
| committer | Salvatore Orlando <salvatore.orlando@eu.citrix.com> | 2011-03-30 10:41:25 +0100 |
| commit | 574980cf15f63c08d4d7d6ac4a406149cfb8bcaf (patch) | |
| tree | 974f100945feedf132e98501e27704e63949688d /nova/adminclient.py | |
| parent | 5350028b64125eda3082425a7a676b547a6ab934 (diff) | |
| parent | f4595104348a3dbfdb5d28c1f5114b51c479db52 (diff) | |
| download | nova-574980cf15f63c08d4d7d6ac4a406149cfb8bcaf.tar.gz nova-574980cf15f63c08d4d7d6ac4a406149cfb8bcaf.tar.xz nova-574980cf15f63c08d4d7d6ac4a406149cfb8bcaf.zip | |
merge trunk
Diffstat (limited to 'nova/adminclient.py')
| -rw-r--r-- | nova/adminclient.py | 13 |
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.""" |
