cellid: Reduce debug logging, always use upper case radiotype

This commit is contained in:
Teemu Ikonen
2023-02-12 17:53:04 +02:00
parent 6454f1d5ee
commit 9dab2b2730

View File

@@ -29,7 +29,7 @@ class CellIdResolver(object):
cur = self.con.cursor()
# radiotype is not required in observations
radio = radiotype.upper() if radiotype is not None else 'GSM'
log.debug(f'search_network: Got {radio} {mcc} {net} {area} {cell}')
# log.debug(f'search_network: Got {radio} {mcc} {net} {area} {cell}')
net = cur.execute("""
SELECT * FROM cell
WHERE radio = ? AND mcc = ? AND net = ? AND area = ? AND cell = ?;
@@ -45,7 +45,8 @@ class CellIdResolver(object):
else:
return None
def _resolve_cell(self, radio, opc, lac, cid) -> Optional[dict]:
def _resolve_cell(self, radiotype, opc, lac, cid) -> Optional[dict]:
radio = radiotype.upper()
mcc, mnc = opc_to_mcc_mnc(opc)
if mcc is None:
log.debug(f'opc to mcc,mnc conversion failed for {radio} {opc}_{lac}_{cid}')