diff options
| author | Devin Carlen <devin.carlen@gmail.com> | 2011-03-15 21:04:38 -0700 |
|---|---|---|
| committer | Devin Carlen <devin.carlen@gmail.com> | 2011-03-15 21:04:38 -0700 |
| commit | ceb8cd14f968aa063bd6a19999340f77c5603568 (patch) | |
| tree | 54a19164c3066d034c8ebdcd80352fe92b7dbdbb /nova/adminclient.py | |
| parent | d36b4d5f3797521b1c2d13a0d30fe98a0671768e (diff) | |
| download | nova-ceb8cd14f968aa063bd6a19999340f77c5603568.tar.gz nova-ceb8cd14f968aa063bd6a19999340f77c5603568.tar.xz nova-ceb8cd14f968aa063bd6a19999340f77c5603568.zip | |
Fixed DescribeUser in ec2 admin client
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.""" |
