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