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