Skip to content

Commit

Permalink
fixing failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
tcarlsen committed Feb 7, 2020
1 parent 3403fbd commit 986aef7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions elodie/geolocation.py
Expand Up @@ -210,6 +210,9 @@ def lookup(**kwargs):
key = get_key()
prefer_english_names = get_prefer_english_names()

if(prefer_english_names):
prefer_language = 'en-EN'

if(key is None):
return None

Expand All @@ -225,8 +228,6 @@ def lookup(**kwargs):
urllib.parse.urlencode(params)
)
headers = {}
if(prefer_english_names):
headers = {'Accept-Language':'en-EN,en;q=0.8'}
r = requests.get(url, headers=headers)
return parse_result(r.json())
except requests.exceptions.RequestException as e:
Expand Down

0 comments on commit 986aef7

Please sign in to comment.