From 072ca100c2840da2b2beff9d037b9e122bcb24c9 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 19 May 2020 17:50:35 +0000 Subject: [PATCH] location: Print country name if possible Signed-off-by: Michael Tremer --- src/python/location-query.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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: -- 2.39.2