From 77100102590f7d3db10460037546a51a432ec8d6 Mon Sep 17 00:00:00 2001 From: Rossen Georgiev Date: Sun, 21 Jan 2018 17:43:58 +0000 Subject: [PATCH] replace raise StopIteration, PEP-479 [ci skip] --- steam/client/builtins/leaderboards.py | 2 +- steam/master_server.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/steam/client/builtins/leaderboards.py b/steam/client/builtins/leaderboards.py index ceb4c94..c684ded 100644 --- a/steam/client/builtins/leaderboards.py +++ b/steam/client/builtins/leaderboards.py @@ -179,7 +179,7 @@ class SteamLeaderboard(object): with ConstantRateLimit(times, seconds, sleep_func=self._steam.sleep) as r: for entries in chunks(self, chunk_size): if not entries: - raise StopIteration + return for entry in entries: yield entry r.wait() diff --git a/steam/master_server.py b/steam/master_server.py index 9abc9df..876ab6e 100644 --- a/steam/master_server.py +++ b/steam/master_server.py @@ -116,7 +116,7 @@ def query(filter_text=r'\napp\500', region=MSRegion.World, master=MSServer.Sourc # check if we've reach the end of the list if ip == '0.0.0.0' and port == 0: - raise StopIteration + return yield ip, port