From 63d83a1a9a400966b170471b33ac6205ebf53c28 Mon Sep 17 00:00:00 2001 From: Larry Williamson Date: Tue, 2 Aug 2016 21:31:57 -0400 Subject: [PATCH] Allow for 3-7 decimal points for coordinates (#2402) Some exports only provide three decimal point accuracy, and sometimes 4.440000 turns into 4.44, need to adjust the regex. --- pokemongo_bot/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pokemongo_bot/__init__.py b/pokemongo_bot/__init__.py index 4c21f87493..102c9e263b 100644 --- a/pokemongo_bot/__init__.py +++ b/pokemongo_bot/__init__.py @@ -518,7 +518,7 @@ def get_pos_by_name(self, location_name): # Check if the given location is already a coordinate. if ',' in location_name: possible_coordinates = re.findall( - "[-]?\d{1,3}[.]\d{6,7}", location_name + "[-]?\d{1,3}[.]\d{3,7}", location_name ) if len(possible_coordinates) == 2: # 2 matches, this must be a coordinate. We'll bypass the Google