From 4e8c90da1daed4b68b76e675ac6cd4ce9b7e6d16 Mon Sep 17 00:00:00 2001 From: "Tobias Wellnitz, DH1TW" Date: Tue, 6 Dec 2022 01:15:21 +0100 Subject: [PATCH] fixed XML parsing error in QRZ.com session key renewal --- docs/source/changelog.rst | 8 ++++++++ pyhamtools/lookuplib.py | 4 ++-- pyhamtools/version.py | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index 303c8cb..fc86733 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -1,6 +1,14 @@ Changelog --------- +PyHamtools 0.8.3 +================ + +06. December 2022 + +* fixed XML parsing error in QRZ.com session key renewal + + PyHamtools 0.8.2 ================ diff --git a/pyhamtools/lookuplib.py b/pyhamtools/lookuplib.py index 35d86d9..5271349 100644 --- a/pyhamtools/lookuplib.py +++ b/pyhamtools/lookuplib.py @@ -783,7 +783,7 @@ class LookupLib(object): else: raise AttributeError("Session Key Missing") #most likely session key missing or invalid - if root.dxcc is None: + if root.DXCC is None: raise ValueError if root.DXCC.dxcc: @@ -830,7 +830,7 @@ class LookupLib(object): raise KeyError(root.Error.text) #try to get a new session key and try to request again - elif re.search('Session Timeout', root.Error.text, re.I) or re.search('Invalid session key', root.error.text, re.I): + elif re.search('Session Timeout', root.Error.text, re.I) or re.search('Invalid session key', root.Error.text, re.I): apikey = self._get_qrz_session_key(self._username, self._pwd) response = self._request_callsign_info_from_qrz(callsign, apikey, apiv) root = BeautifulSoup(response.text, "xml") diff --git a/pyhamtools/version.py b/pyhamtools/version.py index 9b6e845..ee7c949 100644 --- a/pyhamtools/version.py +++ b/pyhamtools/version.py @@ -1,3 +1,3 @@ -VERSION = (0, 8, 2) +VERSION = (0, 8, 3) __release__ = ''.join(['-.'[type(x) == int]+str(x) for x in VERSION])[1:] __version__ = '.'.join((str(VERSION[0]), str(VERSION[1])))