Skip to content

Commit

Permalink
Refactor fetch.py to use descriptive country names in log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasstrands committed Oct 18, 2024
1 parent 803819d commit ad08314
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ def validate_and_load_json(json_str):
def process_link(country, link):
for year, link_info in link.items():
if country == "mu":
country = "Mauritius"
country_name = "Mauritius"
elif country == "fr":
country = "France"
country_name = "France"
elif country == "sa":
country = "South Africa"
country_name = "South Africa"

print(f"Processing link for {country} in {year}...")
print(f"Processing link for {country_name} in {year}...")
url = link_info["url"]
link_type = link_info["type"]
try:
Expand Down

0 comments on commit ad08314

Please sign in to comment.