Skip to content

Commit

Permalink
Merge pull request #154 from fvaleye/fix/country-in-lower-case
Browse files Browse the repository at this point in the history
Make country code in lowercase
  • Loading branch information
fvaleye authored Mar 22, 2023
2 parents 90b4467 + 85e2c2e commit 7697239
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "tracarbon"
authors = ["Florian Valeye <[email protected]>"]
version = "0.6.0"
version = "0.6.1"
description = "Tracarbon is a Python library that tracks your device's energy consumption and calculates your carbon emissions."
readme = "README.md"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion tracarbon/locations/country.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def get_current_country(
logger.debug(f"Send request to this url: {url}, timeout {timeout}s")
text = requests.get(url, timeout=timeout).text
content_json = ujson.loads(text)
return content_json["country"]
return content_json["country"].lower()
except Exception as exception:
logger.error(f"Failed to request this url: {url}")
raise exception
Expand Down

0 comments on commit 7697239

Please sign in to comment.