Fixes a bug where pagination was incorrect. (#628)

This commit is contained in:
kevgliss 2016-12-21 18:39:21 -08:00 committed by GitHub
parent 072ca4da4f
commit f8279d6972
1 changed files with 6 additions and 8 deletions

View File

@ -63,11 +63,10 @@ def get_all_elbs(**kwargs):
elbs += response['LoadBalancerDescriptions']
if not response.get('IsTruncated'):
if not response.get('NextMarker'):
return elbs
if response['NextMarker']:
kwargs.update(dict(marker=response['NextMarker']))
else:
kwargs.update(dict(Marker=response['NextMarker']))
def get_all_elbs_v2(**kwargs):
@ -83,11 +82,10 @@ def get_all_elbs_v2(**kwargs):
response = get_elbs_v2(**kwargs)
elbs += response['LoadBalancers']
if not response.get('IsTruncated'):
if not response.get('NextMarker'):
return elbs
if response['NextMarker']:
kwargs.update(dict(marker=response['NextMarker']))
else:
kwargs.update(dict(Marker=response['NextMarker']))
@sts_client('elbv2')