From 1c2f5c0c50c592a05b2a20032e23dece2ee09a3a Mon Sep 17 00:00:00 2001 From: Matt J Madsen Date: Fri, 19 Aug 2016 12:04:18 -0500 Subject: [PATCH] Impose minimum on walk/alt minimums --- pokecli.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pokecli.py b/pokecli.py index e4489487e3..f2fb345c4c 100644 --- a/pokecli.py +++ b/pokecli.py @@ -563,6 +563,14 @@ def task_configuration_error(flag_name): if "walk" in load: logger.warning('The walk argument is no longer supported. Please use the walk_max and walk_min variables instead') + if config.walk_min < 1: + parser.error("--walk_min is out of range! (should be >= 1.0)") + return None + + if config.alt_min < 0: + parser.error("--alt_min is out of range! (should be >= 0.0)") + return None + if not (config.location or config.location_cache): parser.error("Needs either --use-location-cache or --location.") return None