Improve some error handling. Closes #150

This commit is contained in:
Ian Renton
2026-09-23 17:30:12 +01:00
parent 5bdd79c247
commit 31c7c2095e
20 changed files with 321 additions and 24 deletions
+4
View File
@@ -1,6 +1,7 @@
import logging
import urllib.parse
from datetime import datetime, timedelta
from xml.parsers.expat import ExpatError
import pytz
import xmltodict
@@ -56,6 +57,9 @@ class QRZ(APIQueryCallsignDataProvider):
# Log this failure at debug level only, not our problem if user entered the wrong password.
logger.debug("QRZ.com login details incorrect, failed to look up with QRZ.")
return None
except ExpatError:
logger.warning("QRZ.com provided blank or malformed content when trying to authenticate")
return None
except Exception:
logger.exception("Exception when getting QRZ.com session key")
return None