mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-12-16 00:53:39 +00:00
Rename dx_aprs_ssid to just dx_ssid, and add support for de_ssid. Add SSIDs to the web interface. #68
This commit is contained in:
@@ -141,7 +141,7 @@ class LookupHelper:
|
||||
try:
|
||||
# Start with the basic country-files.com-based decoder.
|
||||
country = self.CALL_INFO_BASIC.get_country_name(call)
|
||||
except KeyError as e:
|
||||
except (KeyError, ValueError) as e:
|
||||
country = None
|
||||
# Couldn't get anything from basic call info database, try QRZ.com
|
||||
if not country:
|
||||
@@ -170,7 +170,7 @@ class LookupHelper:
|
||||
try:
|
||||
# Start with the basic country-files.com-based decoder.
|
||||
dxcc = self.CALL_INFO_BASIC.get_adif_id(call)
|
||||
except KeyError as e:
|
||||
except (KeyError, ValueError) as e:
|
||||
dxcc = None
|
||||
# Couldn't get anything from basic call info database, try QRZ.com
|
||||
if not dxcc:
|
||||
@@ -198,7 +198,7 @@ class LookupHelper:
|
||||
try:
|
||||
# Start with the basic country-files.com-based decoder.
|
||||
continent = self.CALL_INFO_BASIC.get_continent(call)
|
||||
except KeyError as e:
|
||||
except (KeyError, ValueError) as e:
|
||||
continent = None
|
||||
# Couldn't get anything from basic call info database, try Clublog data
|
||||
if not continent:
|
||||
@@ -221,7 +221,7 @@ class LookupHelper:
|
||||
try:
|
||||
# Start with the basic country-files.com-based decoder.
|
||||
cqz = self.CALL_INFO_BASIC.get_cqz(call)
|
||||
except KeyError as e:
|
||||
except (KeyError, ValueError) as e:
|
||||
cqz = None
|
||||
# Couldn't get anything from basic call info database, try QRZ.com
|
||||
if not cqz:
|
||||
@@ -249,7 +249,7 @@ class LookupHelper:
|
||||
try:
|
||||
# Start with the basic country-files.com-based decoder.
|
||||
ituz = self.CALL_INFO_BASIC.get_ituz(call)
|
||||
except KeyError as e:
|
||||
except (KeyError, ValueError) as e:
|
||||
ituz = None
|
||||
# Couldn't get anything from basic call info database, try QRZ.com
|
||||
if not ituz:
|
||||
@@ -273,13 +273,13 @@ class LookupHelper:
|
||||
data = self.LOOKUP_LIB_QRZ.lookup_callsign(callsign=call)
|
||||
self.QRZ_CALLSIGN_DATA_CACHE.add(call, data, expire=604800) # 1 week in seconds
|
||||
return data
|
||||
except KeyError:
|
||||
except (KeyError, ValueError):
|
||||
# QRZ had no info for the call, but maybe it had prefixes or suffixes. Try again with the base call.
|
||||
try:
|
||||
data = self.LOOKUP_LIB_QRZ.lookup_callsign(callsign=callinfo.Callinfo.get_homecall(call))
|
||||
self.QRZ_CALLSIGN_DATA_CACHE.add(call, data, expire=604800) # 1 week in seconds
|
||||
return data
|
||||
except KeyError:
|
||||
except (KeyError, ValueError):
|
||||
# QRZ had no info for the call, that's OK. Cache a None so we don't try to look this up again
|
||||
self.QRZ_CALLSIGN_DATA_CACHE.add(call, None, expire=604800) # 1 week in seconds
|
||||
return None
|
||||
@@ -296,13 +296,13 @@ class LookupHelper:
|
||||
data = self.LOOKUP_LIB_CLUBLOG_API.lookup_callsign(callsign=call)
|
||||
self.CLUBLOG_CALLSIGN_DATA_CACHE.add(call, data, expire=604800) # 1 week in seconds
|
||||
return data
|
||||
except KeyError:
|
||||
except (KeyError, ValueError):
|
||||
# Clublog had no info for the call, but maybe it had prefixes or suffixes. Try again with the base call.
|
||||
try:
|
||||
data = self.LOOKUP_LIB_CLUBLOG_API.lookup_callsign(callsign=callinfo.Callinfo.get_homecall(call))
|
||||
self.CLUBLOG_CALLSIGN_DATA_CACHE.add(call, data, expire=604800) # 1 week in seconds
|
||||
return data
|
||||
except KeyError:
|
||||
except (KeyError, ValueError):
|
||||
# Clublog had no info for the call, that's OK. Cache a None so we don't try to look this up again
|
||||
self.CLUBLOG_CALLSIGN_DATA_CACHE.add(call, None, expire=604800) # 1 week in seconds
|
||||
return None
|
||||
@@ -319,7 +319,7 @@ class LookupHelper:
|
||||
try:
|
||||
data = self.LOOKUP_LIB_CLUBLOG_XML.lookup_callsign(callsign=call)
|
||||
return data
|
||||
except KeyError:
|
||||
except (KeyError, ValueError):
|
||||
# Clublog had no info for the call, that's OK. Cache a None so we don't try to look this up again
|
||||
self.CLUBLOG_CALLSIGN_DATA_CACHE.add(call, None, expire=604800) # 1 week in seconds
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user