ldb = connect(conf["opencellid"]["dbfn"])
+def shut() -> None:
+ if ldb is not None:
+ ldb.close()
+
+
def lookup(
mcc: int, mnc: int, gsm_cells: List[Tuple[int, int, int]], __: Any
) -> Tuple[float, float]:
c.execute(
"""select tstamp, packet from events
where proto in (?, ?)""",
- (WIFI_POSITIONING.PROTO, WIFI_OFFLINE_POSITIONING.PROTO),
+ (proto_name(WIFI_POSITIONING), proto_name(WIFI_OFFLINE_POSITIONING)),
)
init({"opencellid": {"dbfn": sys.argv[2]}})
for timestamp, packet in c: