MCPcopy Index your code
hub / github.com/secdev/scapy / _instance_state

Class _instance_state

scapy/automaton.py:414–443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412
413
414class _instance_state:
415 def __init__(self, instance):
416 # type: (Any) -> None
417 self.__self__ = instance.__self__
418 self.__func__ = instance.__func__
419 self.__self__.__class__ = instance.__self__.__class__
420
421 def __getattr__(self, attr):
422 # type: (str) -> Any
423 return getattr(self.__func__, attr)
424
425 def __call__(self, *args, **kargs):
426 # type: (Any, Any) -> Any
427 return self.__func__(self.__self__, *args, **kargs)
428
429 def breaks(self):
430 # type: () -> Any
431 return self.__self__.add_breakpoints(self.__func__)
432
433 def intercepts(self):
434 # type: () -> Any
435 return self.__self__.add_interception_points(self.__func__)
436
437 def unbreaks(self):
438 # type: () -> Any
439 return self.__self__.remove_breakpoints(self.__func__)
440
441 def unintercepts(self):
442 # type: () -> Any
443 return self.__self__.remove_interception_points(self.__func__)
444
445
446##############

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected