From cd841b0a9545250728c43077ca8be7d278f78700 Mon Sep 17 00:00:00 2001 From: Alex Yao Date: Fri, 19 Aug 2016 11:02:47 -0700 Subject: [PATCH] improve step walker (#4097) --- pokemongo_bot/walkers/step_walker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pokemongo_bot/walkers/step_walker.py b/pokemongo_bot/walkers/step_walker.py index c034b7ca79..a008fe6b64 100644 --- a/pokemongo_bot/walkers/step_walker.py +++ b/pokemongo_bot/walkers/step_walker.py @@ -1,6 +1,6 @@ from math import sqrt -from random import random, uniform +from random import uniform from pokemongo_bot.cell_workers.utils import distance from pokemongo_bot.human_behaviour import random_lat_long_delta, sleep @@ -28,7 +28,7 @@ def __init__(self, bot, dest_lat, dest_lng): self.totalDist = max(1, self.dist) if self.speed == 0: - self.steps = 1 + raise Exception("Walking speed cannot be 0, change your walking speed higher than 1!") else: self.steps = (self.dist + 0.0) / (self.speed + 0.0)