Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug using bool to test prefer_english_names #370

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion elodie/geolocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import urllib.request
import urllib.parse
import urllib.error
from distutils.util import strtobool

from elodie.config import load_config
from elodie import constants
Expand Down Expand Up @@ -135,7 +136,7 @@ def get_prefer_english_names():
if('prefer_english_names' not in config['MapQuest']):
return False

__PREFER_ENGLISH_NAMES__ = bool(config['MapQuest']['prefer_english_names'])
__PREFER_ENGLISH_NAMES__ = bool(strtobool(config['MapQuest']['prefer_english_names']))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks - I think we can eliminate the bool() call here.

return __PREFER_ENGLISH_NAMES__

def place_name(lat, lon):
Expand Down