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

Function plain_str

scapy/compat.py:137–142  ·  view source on GitHub ↗

Convert basic byte objects to str

(x)

Source from the content-addressed store, hash-verified

135
136
137def plain_str(x):
138 # type: (Any) -> str
139 """Convert basic byte objects to str"""
140 if isinstance(x, bytes):
141 return x.decode(errors="backslashreplace")
142 return str(x)
143
144
145def chb(x):

Callers 15

routeMethod · 0.90
_inet6_ptonFunction · 0.90
inet_ptonFunction · 0.90
_inet6_ntopFunction · 0.90
__str__Method · 0.90
mac2strFunction · 0.90
valid_ipFunction · 0.90
valid_netFunction · 0.90
valid_ip6Function · 0.90
valid_net6Function · 0.90
get_outputMethod · 0.90
do_graphFunction · 0.90

Calls 1

decodeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…