Skip to content

Commit

Permalink
🔊 Improve logs
Browse files Browse the repository at this point in the history
  • Loading branch information
i-be-snek committed Oct 30, 2024
1 parent df59717 commit 49b3cca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Database/scr/normalize_locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ def normalize_locations(
try:
try:
if area:
assert isinstance(area, str), f"Area is not a string: {area}"
assert isinstance(area, str), f"Area `{area}` is not a string; type: {type(area)}"
if re.match(
"(country|location|area|adminarea|admin|admin_area|administrative area|administrative_area|none|null)(\s)*(s)*[0-9]*$",
area,
flags=re.IGNORECASE,
):
self.logger.error(f"Input area={area} type={type(area)} is not a valid area name")
self.logger.error(f"Input `{area}` of type {type(area)} is not a valid area name")
return (None, None, None)
if in_country:
assert isinstance(in_country, str), f"Country is not a string: {in_country}"
Expand Down

0 comments on commit 49b3cca

Please sign in to comment.