MCPcopy Create free account
hub / github.com/secdev/scapy / __getitem__

Method __getitem__

scapy/data.py:404–412  ·  view source on GitHub ↗
(self, attr)

Source from the content-addressed store, hash-verified

402 super(EtherDA, self).__setitem__(attr, val)
403
404 def __getitem__(self, attr):
405 # type: (int) -> Any
406 if isinstance(attr, str):
407 warnings.warn(
408 "Please use 'ETHER_TYPES.%s'" % attr,
409 DeprecationWarning
410 )
411 return super(EtherDA, self).__getattr__(attr)
412 return super(EtherDA, self).__getitem__(attr)
413
414
415@scapy_data_cache("ethertypes")

Callers

nothing calls this directly

Calls 1

__getattr__Method · 0.45

Tested by

no test coverage detected