From 21c7c13dcdf897008a7f340e606c947092ba51bd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 9 Dec 2023 06:14:48 +0100 Subject: [PATCH] Continued: - logged domain name - better check variable software against None and empty string --- fba/http/federation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fba/http/federation.py b/fba/http/federation.py index 88a100e..f39bdc8 100644 --- a/fba/http/federation.py +++ b/fba/http/federation.py @@ -455,14 +455,14 @@ def determine_software(domain: str, path: str = None) -> str: logger.debug("Returning None - EXIT!") return None - logger.debug("Setting original software='%s' ...", software) + logger.debug("Setting original software='%s' for domain='%s' ...", software, domain) instances.set_original_software(domain, software) logger.debug("software='%s'- BEFORE!", software) software = software_helper.alias(software) logger.debug("software['%s']='%s' - AFTER!", type(software), software) - if str(software) == "": + if software in [None, ""]: logger.debug("software for domain='%s' was not detected, trying generator ...", domain) software = fetch_generator_from_path(domain) elif len(str(software)) > 0 and ("." in software or " " in software): -- 2.39.5