From 3b5df2a58ebc17f5eeb819657942fc8483a8e0c8 Mon Sep 17 00:00:00 2001 From: Douglas Camata Date: Sun, 7 Aug 2016 23:19:59 +0200 Subject: [PATCH] fixing loop in spin fort task --- pokemongo_bot/cell_workers/spin_fort.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pokemongo_bot/cell_workers/spin_fort.py b/pokemongo_bot/cell_workers/spin_fort.py index e04a86dbc6..2b1c862fc9 100644 --- a/pokemongo_bot/cell_workers/spin_fort.py +++ b/pokemongo_bot/cell_workers/spin_fort.py @@ -139,6 +139,11 @@ def work(self): def get_fort_in_range(self): forts = self.bot.get_forts(order_by_distance=True) + for fort in forts: + if 'cooldown_complete_timestamp_ms' in fort: + self.bot.fort_timeouts[fort["id"]] = fort['cooldown_complete_timestamp_ms'] + forts.remove(fort) + forts = filter(lambda x: x["id"] not in self.bot.fort_timeouts, forts) if len(forts) == 0: