Skip to content

Commit

Permalink
Replace logging with exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
ekatef committed Oct 16, 2023
1 parent a1da96e commit 736ac39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/build_shapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ def download_GADM(country_code, update=False, out_logging=False):
try:
r = requests.get(GADM_url, stream=True, timeout=300)
except (requests.exceptions.ConnectionError, requests.exceptions.Timeout):
logger.error(
raise Exception(
f"GADM server is down at {GADM_url}. Data needed for building shapes can't be extracted.\n\r"
)
except Exception as exception:
logger.error(
raise Exception(
f"An error happened when trying to load GADM data by {GADM_url}.\n\r"
+ str(exception)
+ "\n\r"
Expand Down

0 comments on commit 736ac39

Please sign in to comment.