]> git.ipfire.org Git - people/ms/libloc.git/commitdiff
importer: Convert country codes to uppercase from Geofeeds
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 4 Jul 2023 09:38:15 +0000 (09:38 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 4 Jul 2023 09:38:15 +0000 (09:38 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/scripts/location-importer.in

index 4a54aae8d63a96079f53c8236e6d0ca9e55b83bd..7b47668c43dcadaf10729c83ffc3a6060e55029e 100644 (file)
@@ -1357,8 +1357,10 @@ class CLI(object):
                                                        continue
 
                                                # Strip any excess whitespace from country codes
-                                               if country:
-                                                       country = country.strip()
+                                               country = country.strip()
+
+                                               # Make the country code uppercase
+                                               country = country.upper()
 
                                                # Check the country code
                                                if not country: