Skip to content

Commit

Permalink
Return type None on nested call was breaking details display (#2416)
Browse files Browse the repository at this point in the history
  • Loading branch information
reddivision authored and douglascamata committed Aug 3, 2016
1 parent 21254bc commit 4a1f649
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pokemongo_bot/cell_workers/incubate_eggs.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ def _check_inventory(self, lookup_ids=[]):
"used": False
})
elif 'is_egg' not in pokemon and pokemon['id'] in lookup_ids:
matched_pokemon.append(pokemon.update({
pokemon.update({
"iv": [
pokemon.get('individual_attack', 0),
pokemon.get('individual_defense', 0),
pokemon.get('individual_stamina', 0)
]
}))
]})
matched_pokemon.append(pokemon)
continue
if "player_stats" in inv_data:
self.km_walked = inv_data.get("player_stats", {}).get("km_walked", 0)
Expand Down Expand Up @@ -151,10 +151,10 @@ def _hatch_eggs(self):
pokemon['name'] = "error"
except:
pokemon_data = [{"name":"error","cp":"error","iv":"error"}]
logger.log("-"*30, log_color)
if not pokemon_ids or pokemon_data[0]['name'] == "error":
logger.log("[!] Eggs hatched, but we had trouble with the response. Please check your inventory to find your new pokemon!",'red')
return
logger.log("-"*30, log_color)
logger.log("[!] {} eggs hatched! Received:".format(len(pokemon_data)), log_color)
for i in range(len(pokemon_data)):
logger.log("-"*30,log_color)
Expand Down

0 comments on commit 4a1f649

Please sign in to comment.