mirror of
https://github.com/dh1tw/pyhamtools.git
synced 2025-12-06 06:52:00 +01:00
fixed XML parsing error in QRZ.com session key renewal
This commit is contained in:
parent
b8bd89b2f2
commit
4e8c90da1d
|
|
@ -1,6 +1,14 @@
|
||||||
Changelog
|
Changelog
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
PyHamtools 0.8.3
|
||||||
|
================
|
||||||
|
|
||||||
|
06. December 2022
|
||||||
|
|
||||||
|
* fixed XML parsing error in QRZ.com session key renewal
|
||||||
|
|
||||||
|
|
||||||
PyHamtools 0.8.2
|
PyHamtools 0.8.2
|
||||||
================
|
================
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -783,7 +783,7 @@ class LookupLib(object):
|
||||||
else:
|
else:
|
||||||
raise AttributeError("Session Key Missing") #most likely session key missing or invalid
|
raise AttributeError("Session Key Missing") #most likely session key missing or invalid
|
||||||
|
|
||||||
if root.dxcc is None:
|
if root.DXCC is None:
|
||||||
raise ValueError
|
raise ValueError
|
||||||
|
|
||||||
if root.DXCC.dxcc:
|
if root.DXCC.dxcc:
|
||||||
|
|
@ -830,7 +830,7 @@ class LookupLib(object):
|
||||||
raise KeyError(root.Error.text)
|
raise KeyError(root.Error.text)
|
||||||
|
|
||||||
#try to get a new session key and try to request again
|
#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)
|
apikey = self._get_qrz_session_key(self._username, self._pwd)
|
||||||
response = self._request_callsign_info_from_qrz(callsign, apikey, apiv)
|
response = self._request_callsign_info_from_qrz(callsign, apikey, apiv)
|
||||||
root = BeautifulSoup(response.text, "xml")
|
root = BeautifulSoup(response.text, "xml")
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
VERSION = (0, 8, 2)
|
VERSION = (0, 8, 3)
|
||||||
__release__ = ''.join(['-.'[type(x) == int]+str(x) for x in VERSION])[1:]
|
__release__ = ''.join(['-.'[type(x) == int]+str(x) for x in VERSION])[1:]
|
||||||
__version__ = '.'.join((str(VERSION[0]), str(VERSION[1])))
|
__version__ = '.'.join((str(VERSION[0]), str(VERSION[1])))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue