Skip to content

Commit

Permalink
EMR: Fix describe-cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanasudhan authored and kyleknap committed Oct 16, 2014
1 parent e48fbdb commit 0b95ce7
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions awscli/customizations/emr/describecluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,26 +76,9 @@ def _call(self, operation_object, parameters, parsed_globals):
region_name=parsed_globals.region,
endpoint_url=parsed_globals.endpoint_url,
verify=parsed_globals.verify_ssl)
if operation_object.can_paginate and parsed_globals.paginate:
pages = operation_object.paginate(endpoint, **parameters)
key = None
for page in pages:
http_response = page[0]
if http_response.status_code == 200:
response_data = page[1]
keys = response_data.keys()
key = self._get_key_of_result(keys)
if key is not None:
result += response_data.get(key)

if key is not None:
return {key: result}
else:
return None
else:
http_response, response_data = operation_object.call(endpoint,
http_response, response_data = operation_object.call(endpoint,
**parameters)
return response_data
return response_data

def _get_key_of_result(self, keys):
# Return the first key that is not "Marker"
Expand Down

0 comments on commit 0b95ce7

Please sign in to comment.