From 159e23d63fbfb990692e24a88b6750a00b9aae55 Mon Sep 17 00:00:00 2001
From: mbridak <michael.bridak@gmail.com>
Date: Tue, 5 Nov 2024 10:57:20 -0800
Subject: [PATCH] @mbridak Provided initial condition for root.

---
 not1mm/lib/lookup.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/not1mm/lib/lookup.py b/not1mm/lib/lookup.py
index 9e1d511f..720d3474 100644
--- a/not1mm/lib/lookup.py
+++ b/not1mm/lib/lookup.py
@@ -183,7 +183,7 @@ def lookup(self, call: str) -> dict:
         Lookup a call on QRZ
         """
         logger.info("%s", call)
-        _response = None
+        root = {}
         if self.session:
             payload = {"s": self.session, "callsign": call}
             try:
@@ -208,7 +208,7 @@ def lookup(self, call: str) -> dict:
                         self.qrzurl, params=payload, timeout=3.0
                     )
                     baseroot = xmltodict.parse(query_result.text)
-                    root = baseroot.get("QRZDatabase")
+                    root = baseroot.get("QRZDatabase", {})
         return root.get("Callsign")