diff options
| author | Justin Santa Barbara <justin@fathomdb.com> | 2011-03-30 09:17:46 -0700 |
|---|---|---|
| committer | Justin Santa Barbara <justin@fathomdb.com> | 2011-03-30 09:17:46 -0700 |
| commit | 8a56ff7268b936a0b559e9a548cb587ff6aa5907 (patch) | |
| tree | f807d47aee5e5cde8ef95291999e37b0b27ca5e0 /nova/adminclient.py | |
| parent | 9686b3a296c53486a64a949ae2f7430e25df2dcb (diff) | |
| parent | f77c58ce317f9674671a1b44563ef3645533c815 (diff) | |
Merged with 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.""" |
