Skip to content

Commit

Permalink
Fix missing exception
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit-cty committed Sep 11, 2022
1 parent 30aa0ac commit 88b1fad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codecarbon/external/geography.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def __repr__(self) -> str:
def from_geo_js(cls, url: str) -> "GeoMetadata":
try:
response: Dict = requests.get(url, timeout=0.5).json()
except requests.exceptions.Timeout:
except (requests.exceptions.Timeout, requests.exceptions.ConnectionError):
# If there is a timeout, we default to Canada
logger.info(
"Unable to access geographical location. \
Expand Down

0 comments on commit 88b1fad

Please sign in to comment.