Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
added rate limit warning
Browse files Browse the repository at this point in the history
  • Loading branch information
nborrmann committed Aug 9, 2016
1 parent 9e130ac commit cbea6b3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pogom/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit cbea6b3

Please sign in to comment.