From 141b2e1da39aedb7ed2bb7b87a06ed4accc7df79 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Mon, 28 Nov 2022 17:40:27 +0300 Subject: [PATCH] csv_metadata_quality/check.py: update region output Add the country to the message about missing regions. This makes it easier to see which country is triggering the missing region error, and helps in case of debugging possible mistakes in the data coming from the country_converter library. --- csv_metadata_quality/check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csv_metadata_quality/check.py b/csv_metadata_quality/check.py index 188b1ed..cd7ed72 100755 --- a/csv_metadata_quality/check.py +++ b/csv_metadata_quality/check.py @@ -550,7 +550,7 @@ def countries_match_regions(row, exclude): if un_region != "not found" and un_region not in regions: print( - f"{Fore.YELLOW}Missing region ({un_region}): {Fore.RESET}{row[title_column_name]}" + f"{Fore.YELLOW}Missing region ({country} → {un_region}): {Fore.RESET}{row[title_column_name]}" ) return