Skip to content

Commit

Permalink
cleanup tester present sender
Browse files Browse the repository at this point in the history
  • Loading branch information
polybassa committed May 3, 2024
1 parent 1b2780d commit 9e1cc08
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scapy/contrib/automotive/scanner/enumerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@ def _get_initial_requests(self, **kwargs):

def __reduce__(self): # type: ignore
f, t, d = super(ServiceEnumerator, self).__reduce__() # type: ignore

try:
del d["_tester_present_sender"]
except KeyError:
pass

try:
for k, v in d["_request_iterators"].items():
d["_request_iterators"][k] = list(v)
Expand Down Expand Up @@ -287,6 +293,10 @@ def pre_execute(self, socket, state, global_configuration):
except KeyError:
self._tester_present_sender = None

def post_execute(self, socket, state, global_configuration):
# type: (_SocketUnion, EcuState, AutomotiveTestCaseExecutorConfiguration) -> None
self._tester_present_sender = None

def execute(self, socket, state, **kwargs):
# type: (_SocketUnion, EcuState, Any) -> None
self.check_kwargs(kwargs)
Expand Down

0 comments on commit 9e1cc08

Please sign in to comment.