Skip to content

Commit da2708f

Browse files
committed
Fixes a bug where iter was seen as an invalid argument to call()
1 parent 589f1dc commit da2708f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

SoftLayer/API.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def call(self, service, method, *args, **kwargs):
247247
[...]
248248
249249
"""
250-
if kwargs.get('iter'):
250+
if kwargs.pop('iter', False):
251251
return self.iter_call(service, method, *args, **kwargs)
252252

253253
invalid_kwargs = set(kwargs.keys()) - VALID_CALL_ARGS

SoftLayer/tests/api_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ def test_mask_call_invalid_mask(self, make_xml_rpc_api_call):
276276
@patch('SoftLayer.API.Client.iter_call')
277277
def test_iterate(self, _iter_call):
278278
self.client['SERVICE'].METHOD(iter=True)
279-
_iter_call.assert_called_with('SERVICE', 'METHOD', iter=True)
279+
_iter_call.assert_called_with('SERVICE', 'METHOD')
280280

281281
@patch('SoftLayer.API.Client.iter_call')
282282
def test_service_iter_call(self, _iter_call):

0 commit comments

Comments
 (0)