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

Method i2repr

scapy/fields.py:3270–3279  ·  view source on GitHub ↗
(self,
               pkt,  # type: Optional[Packet]
               x,  # type: Any
               )

Source from the content-addressed store, hash-verified

3268 return self._fixup_val(super(FlagsField, self).i2h(pkt, x))
3269
3270 def i2repr(self,
3271 pkt, # type: Optional[Packet]
3272 x, # type: Any
3273 ):
3274 # type: (...) -> str
3275 if isinstance(x, (list, tuple)):
3276 return repr(type(x)(
3277 "None" if v is None else str(self._fixup_val(v)) for v in x
3278 ))
3279 return "None" if x is None else str(self._fixup_val(x))
3280
3281
3282MultiFlagsEntry = collections.namedtuple('MultiFlagsEntry', ['short', 'long'])

Callers

nothing calls this directly

Calls 1

_fixup_valMethod · 0.95

Tested by

no test coverage detected