MCPcopy Index your code
hub / github.com/python/cpython / sanitize

Method sanitize

Lib/ftplib.py:188–192  ·  view source on GitHub ↗
(self, s)

Source from the content-addressed store, hash-verified

186
187 # Internal: "sanitize" a string for printing
188 def sanitize(self, s):
189 if s[:5] in {'pass ', 'PASS '}:
190 i = len(s.rstrip('\r\n'))
191 s = s[:5] + '*'*(i-5) + s[i:]
192 return repr(s)
193
194 # Internal: send one line to the server, appending CRLF
195 def putline(self, line):

Callers 7

getwelcomeMethod · 0.95
putlineMethod · 0.95
putcmdMethod · 0.95
getlineMethod · 0.95
getrespMethod · 0.95
abortMethod · 0.95
test_sanitizeMethod · 0.80

Calls 1

rstripMethod · 0.45

Tested by 1

test_sanitizeMethod · 0.64