From cbea6b37e4ea187b1f9da4671e5c1e440e8d81ba Mon Sep 17 00:00:00 2001 From: nbo Date: Tue, 9 Aug 2016 14:30:39 +0200 Subject: [PATCH] added rate limit warning --- pogom/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pogom/models.py b/pogom/models.py index 5383c523..1cd23ef9 100644 --- a/pogom/models.py +++ b/pogom/models.py @@ -108,6 +108,9 @@ def parse_map(map_dict): gyms = {} cells = map_dict['responses']['GET_MAP_OBJECTS']['map_cells'] + if sum(len(cell.keys()) for cell in cells) == len(cells) * 2: + log.warning("Received valid response but without any data. Possibly rate-limited?") + for cell in cells: for p in cell.get('wild_pokemons', []): if p['encounter_id'] in pokemons: