]> git.ipfire.org Git - people/ms/libloc.git/blobdiff - src/python/location-query.in
location: Print country name if possible
[people/ms/libloc.git] / src / python / location-query.in
index c13feb135c222d8724527ecba5b154e52a2b64d3..5f05b5cdb68327812131f3e6e6f93b3645be83c2 100644 (file)
@@ -292,7 +292,12 @@ class CLI(object):
 
                        # Print country
                        if network.country_code:
-                               print(format % (_("Country"), network.country_code))
+                               country = db.get_country(network.country_code)
+
+                               print(format % (
+                                       _("Country"),
+                                       country.name if country else network.country_code),
+                               )
 
                        # Print AS information
                        if network.asn: