MCPcopy Index your code
hub / github.com/shadowsocks/shadowsocks / to_bytes

Function to_bytes

shadowsocks/common.py:63–67  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

61
62
63def to_bytes(s):
64 if bytes != str:
65 if type(s) == str:
66 return s.encode('utf-8')
67 return s
68
69
70def to_str(s):

Callers 3

get_configFunction · 0.90
inet_ntopFunction · 0.85
parse_headerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected