From 58c236120f16265b0f1d4c6e1397dfb87581bf35 Mon Sep 17 00:00:00 2001 From: Stuart Travers Date: Thu, 10 Nov 2016 07:57:48 +1100 Subject: [PATCH] Fix ValueError crash ValueError, "non-integer arg 1 for randrange()" --- pokecli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pokecli.py b/pokecli.py index 36df60566c..f80dfc5edc 100644 --- a/pokecli.py +++ b/pokecli.py @@ -186,7 +186,9 @@ def get_commit_hash(): finished = False while not finished: - wait_time = randint((config.reconnecting_timeout * 0.8 * 60), (config.reconnecting_timeout * 1.2 * 60)) + min_wait_time = int(config.reconnecting_timeout * 0.8 * 60) + max_wait_time = int(config.reconnecting_timeout * 1.2 * 60) + wait_time = randint(min_wait_time, max_wait_time) try: bot = initialize(config) bot = start_bot(bot, config)