(self, pcap_name: str)
| 52 | self._con = None |
| 53 | |
| 54 | def has_session(self, pcap_name: str) -> bool: |
| 55 | if self._con is None: |
| 56 | return False |
| 57 | try: |
| 58 | cur = self._con.execute( |
| 59 | "SELECT 1 FROM sessions WHERE pcap_name = ?", (pcap_name,) |
| 60 | ) |
| 61 | return cur.fetchone() is not None |
| 62 | except Exception as exc: |
| 63 | log.warning("SqliteStore.has_session: %s", exc) |
| 64 | return False |
| 65 | |
| 66 | def save_session(self, pcap_name: str) -> None: |
| 67 | if self._con is None: |
no outgoing calls