mirror of
https://github.com/dh1tw/pyhamtools.git
synced 2025-12-06 06:52:00 +01:00
raising KeyError when Callsign not found and the session key has just expired
This commit is contained in:
parent
88a80525ad
commit
29a06dda7e
|
|
@ -801,7 +801,11 @@ class LookupLib(object):
|
|||
|
||||
#if this fails again, raise error
|
||||
if root.error:
|
||||
raise AttributeError(root.error.text) #most likely session key invalid
|
||||
|
||||
if re.search('Not found', root.error.text, re.I): #No data available for callsign
|
||||
raise KeyError(root.error.text)
|
||||
else:
|
||||
raise AttributeError(root.error.text) #most likely session key invalid
|
||||
|
||||
else:
|
||||
raise AttributeError(root.error.text) #most likely session key missing
|
||||
|
|
|
|||
Loading…
Reference in a new issue