Finalize session.
(self)
| 1312 | pass |
| 1313 | |
| 1314 | # Add Cell towers |
| 1315 | with self._lock: |
| 1316 | try: |
| 1317 | with sqlite3.connect(self.db_path) as conn: |
| 1318 | conn.row_factory = sqlite3.Row |
| 1319 | cell_rows = conn.execute("SELECT * FROM cell_towers WHERE latitude IS NOT NULL").fetchall() |
| 1320 | for row in cell_rows: |
| 1321 | r = dict(row) |
| 1322 | kml_parts.append(f'''<Placemark> |
| 1323 | <name>Cell: {r.get("provider","")} {r.get("tech","")}</name> |
| 1324 | <description>CellID: {r.get("cell_id","")}\nMCC/MNC: {r.get("mcc","")}/{r.get("mnc","")}\nSignal: {r.get("signal_dbm",-120)} dBm</description> |
| 1325 | <styleUrl>#cell</styleUrl> |
| 1326 | <Point><coordinates>{r.get("longitude",0)},{r.get("latitude",0)},0</coordinates></Point> |
| 1327 | </Placemark>''') |
| 1328 | except Exception: |
| 1329 | pass |
| 1330 | |
| 1331 | # Add GPS track |
| 1332 | with self._lock: |
no test coverage detected