Skip to content

Commit

Permalink
Allow for 3-7 decimal points for coordinates (PokemonGoF#2402)
Browse files Browse the repository at this point in the history
Some exports only provide three decimal point accuracy, and sometimes 4.440000 turns into 4.44, need to adjust the regex.
  • Loading branch information
L422Y authored and MFizz committed Aug 3, 2016
1 parent c19d25b commit 04e7932
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pokemongo_bot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,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
Expand Down

0 comments on commit 04e7932

Please sign in to comment.