From fae56745bf377a14c527701266dd30284dd8efe4 Mon Sep 17 00:00:00 2001 From: Romain J Date: Thu, 11 Feb 2021 16:15:43 +0100 Subject: [PATCH] fix(commands|Network>iplocalise): quickfix when no org is returned --- tuxbot/cogs/Network/functions/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuxbot/cogs/Network/functions/utils.py b/tuxbot/cogs/Network/functions/utils.py index 214ee80..bd6d1b6 100644 --- a/tuxbot/cogs/Network/functions/utils.py +++ b/tuxbot/cogs/Network/functions/utils.py @@ -73,7 +73,7 @@ def merge_ipinfo_ipwhois(ipinfo_result: dict, ipwhois_result: dict) -> dict: if ipinfo_result: org = ipinfo_result.get("org", "") - asn = org.split()[0] + asn = org.split()[0] if len(org.split()) > 1 else 'N/A' output["belongs"] = f"[{org}](https://bgp.he.net/{asn})" output["rir"] = f"```{ipwhois_result.get('asn_registry', 'N/A')}```"