(cls,
*args, # type: Any
**kargs # type: Any
)
| 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 |
nothing calls this directly
no test coverage detected