From 1983047bcbb5a94b3af9f13730c008bed80445c3 Mon Sep 17 00:00:00 2001 From: Be Date: Sun, 3 Mar 2024 17:42:38 +0100 Subject: [PATCH] whois --- pylib/whois.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pylib/whois.py b/pylib/whois.py index a4c24bb..4b0a4a1 100755 --- a/pylib/whois.py +++ b/pylib/whois.py @@ -29,6 +29,9 @@ def whois_query(query, get_field="netname", get_org=False): if line.startswith(get_field + ':'): basic_name = line.split(':')[1].strip() + if org_name is None: + org_name = 'No org name found' + if get_org is True: return basic_name + ' (' + org_name + ')' else: