From: Michael Tremer Date: Tue, 19 May 2020 17:50:35 +0000 (+0000) Subject: location: Print country name if possible X-Git-Tag: 0.9.1~7 X-Git-Url: http://git.ipfire.org/?p=people%2Fms%2Flibloc.git;a=commitdiff_plain;h=072ca100c2840da2b2beff9d037b9e122bcb24c9 location: Print country name if possible Signed-off-by: Michael Tremer --- diff --git a/src/python/location-query.in b/src/python/location-query.in index c13feb1..5f05b5c 100644 --- a/src/python/location-query.in +++ b/src/python/location-query.in @@ -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: