Adds a flow to the state. If the flow already exists, it is ignored.
(self, flows: Sequence[mitmproxy.flow.Flow])
| 509 | logging.error(str(e)) |
| 510 | |
| 511 | def add(self, flows: Sequence[mitmproxy.flow.Flow]) -> None: |
| 512 | """ |
| 513 | Adds a flow to the state. If the flow already exists, it is |
| 514 | ignored. |
| 515 | """ |
| 516 | for f in flows: |
| 517 | if f.id not in self._store: |
| 518 | self._store[f.id] = f |
| 519 | if self.filter(f): |
| 520 | self._base_add(f) |
| 521 | if self.focus_follow: |
| 522 | self.focus.flow = f |
| 523 | self.sig_view_add.send(flow=f) |
| 524 | |
| 525 | def get_by_id(self, flow_id: str) -> mitmproxy.flow.Flow | None: |
| 526 | """ |