mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
addons.view: fix tests
This commit is contained in:
parent
0b2a2ad2a6
commit
7a6bae336b
@ -211,14 +211,13 @@ class Focus:
|
||||
def __init__(self, v: View) -> None:
|
||||
self.view = v
|
||||
self._flow = None
|
||||
self.sig_change = blinker.Signal()
|
||||
if len(self.view):
|
||||
self.flow = self.view[0]
|
||||
v.sig_add.connect(self._sig_add)
|
||||
v.sig_remove.connect(self._sig_remove)
|
||||
v.sig_refresh.connect(self._sig_refresh)
|
||||
|
||||
self.sig_change = blinker.Signal()
|
||||
|
||||
@property
|
||||
def flow(self) -> typing.Optional[mitmproxy.flow.Flow]:
|
||||
return self._flow
|
||||
|
Loading…
Reference in New Issue
Block a user