From 611a6da196d4f546edbbb05b5ac4dd1f77d40aed Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 24 Oct 2021 12:49:01 +0100 Subject: [PATCH] Check that user agent exists --- daemon.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/daemon.py b/daemon.py index 279fc6788..d33e27113 100644 --- a/daemon.py +++ b/daemon.py @@ -396,6 +396,9 @@ class PubServer(BaseHTTPRequestHandler): """Updates a dictionary of known crawlers accessing nodeinfo or the masto API """ + if not uaStr: + return + currTime = int(time.time()) if self.server.knownCrawlers.get(uaStr): self.server.knownCrawlers[uaStr]['hits'] += 1