mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 14:27:42 +00:00
Logging tidy-up, IDE inspection fixes
This commit is contained in:
+6
-6
@@ -1,4 +1,4 @@
|
||||
import copy
|
||||
import hashlib
|
||||
import hashlib
|
||||
import json
|
||||
import logging
|
||||
@@ -9,12 +9,12 @@ from datetime import datetime, timedelta
|
||||
import pytz
|
||||
from pyhamtools.locator import locator_to_latlong, latlong_to_locator
|
||||
|
||||
from core.call_lookup_helper import get_call_info
|
||||
from core.config import MAX_SPOT_AGE
|
||||
from core.constants import MODE_ALIASES, PROPAGATION_MODES
|
||||
from core.geo_utils import lat_lon_to_cq_zone, lat_lon_to_itu_zone
|
||||
from core.call_lookup_helper import get_call_info
|
||||
from core.sig_utils import ANY_SIG_REGEX, get_ref_regex_for_sig, get_sig_name_from_comment_name
|
||||
from core.sig_lookup_helper import populate_missing_sig_ref_info
|
||||
from core.sig_utils import ANY_SIG_REGEX, get_ref_regex_for_sig, get_sig_name_from_comment_name
|
||||
from core.utils import infer_band_from_freq, infer_mode_from_comment, \
|
||||
infer_mode_from_frequency, infer_mode_type_from_mode, get_flag_for_dxcc
|
||||
from data.sig_ref import SIGRef
|
||||
@@ -413,7 +413,7 @@ class Spot:
|
||||
or (self.dx_location_source == "HOME QTH" and "/" not in (self.dx_call or ""))))
|
||||
|
||||
# DE with no digits and APRS servers starting "T2" are not things we can look up location for
|
||||
if self.de_call and any(char.isdigit() for char in self.de_call) and not (
|
||||
if self.de_call and any(char.isdigit() for char in str(self.de_call)) and not (
|
||||
self.de_call.startswith("T2") and self.source == "APRS-IS"):
|
||||
# DE operator location lookup
|
||||
if not self.de_latitude:
|
||||
@@ -421,8 +421,8 @@ class Spot:
|
||||
self.de_longitude = de_call_info.longitude
|
||||
self.de_grid = de_call_info.grid
|
||||
|
||||
except Exception as e:
|
||||
logging.error("Exception while inferring missing data from spot", e, exc_info=True)
|
||||
except Exception:
|
||||
logging.exception("Exception while inferring missing data from spot")
|
||||
|
||||
def to_json(self):
|
||||
"""JSON serialise"""
|
||||
|
||||
Reference in New Issue
Block a user