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

Method __call__

scapy/base_classes.py:462–482  ·  view source on GitHub ↗
(cls,
                 *args,  # type: Any
                 **kargs  # type: Any
                 )

Source from the content-addressed store, hash-verified

460 raise AttributeError(attr)
461
462 def __call__(cls,
463 *args, # type: Any
464 **kargs # type: Any
465 ):
466 # type: (...) -> 'Packet'
467 if "dispatch_hook" in cls.__dict__:
468 try:
469 cls = cls.dispatch_hook(*args, **kargs)
470 except Exception:
471 from scapy import config
472 if config.conf.debug_dissector:
473 raise
474 cls = config.conf.raw_layer
475 i = cls.__new__(
476 cls, # type: ignore
477 cls.__name__,
478 cls.__bases__,
479 cls.__dict__ # type: ignore
480 )
481 i.__init__(*args, **kargs)
482 return i # type: ignore
483
484
485# Note: see compat.py for an explanation

Callers

nothing calls this directly

Calls 3

dispatch_hookMethod · 0.45
__new__Method · 0.45
__init__Method · 0.45

Tested by

no test coverage detected