From 0fe6b1d9785339e5b395d9cfd2f1a849b4c0e437 Mon Sep 17 00:00:00 2001 From: net8q Date: Sat, 20 Aug 2016 01:05:10 +0200 Subject: [PATCH] Only go through CompleteTutorial once at launch --- pokemongo_bot/cell_workers/complete_tutorial.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pokemongo_bot/cell_workers/complete_tutorial.py b/pokemongo_bot/cell_workers/complete_tutorial.py index 1706bb6908..4713913896 100644 --- a/pokemongo_bot/cell_workers/complete_tutorial.py +++ b/pokemongo_bot/cell_workers/complete_tutorial.py @@ -15,15 +15,19 @@ def initialize(self): self.api = self.bot.api self.nickname = self.config.get('nickname','') self.team = self.config.get('team',0) + self.may_run = True def should_run(self): - return True + return self.may_run def work(self): if not self.should_run(): return WorkerResult.SUCCESS + # Only execute the worker once to avoid error loop + self.may_run = False + if self._check_tutorial_state(): return WorkerResult.SUCCESS else: