Skip to content

Commit 2006b9d

Browse files
Fixed an issue with cf_call not getting the last page of results
1 parent cd9d117 commit 2006b9d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

SoftLayer/API.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,8 @@ def cf_call(self, service, method, *args, **kwargs):
471471
if not isinstance(first_call, transports.SoftLayerListResult):
472472
return first_call
473473
# How many more API calls we have to make
474-
api_calls = math.ceil((first_call.total_count - limit) / limit)
474+
# +1 at the end here because 'range' doesn't include the stop number
475+
api_calls = math.ceil((first_call.total_count - limit) / limit) + 1
475476

476477
def this_api(offset):
477478
"""Used to easily call executor.map() on this fuction"""

0 commit comments

Comments
 (0)