Skip to content

Commit b7719e2

Browse files
committed
Fix compatibility with Python 3.7
Simply replace the raise statement with return. All tests pass with Python 3.7.0 here with the change.
1 parent 04f237d commit b7719e2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

SoftLayer/API.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def iter_call(self, service, method, *args, **kwargs):
298298
results = transports.SoftLayerListResult(results, len(results))
299299
else:
300300
yield results
301-
raise StopIteration
301+
return
302302

303303
for item in results:
304304
yield item
@@ -313,8 +313,6 @@ def iter_call(self, service, method, *args, **kwargs):
313313

314314
offset += limit
315315

316-
raise StopIteration
317-
318316
def __repr__(self):
319317
return "Client(transport=%r, auth=%r)" % (self.transport, self.auth)
320318

0 commit comments

Comments
 (0)