MCPcopy
hub / github.com/tornadoweb/tornado / _safe_unicode

Function _safe_unicode

tornado/log.py:74–78  ·  view source on GitHub ↗
(s: Any)

Source from the content-addressed store, hash-verified

72
73
74def _safe_unicode(s: Any) -> str:
75 try:
76 return _unicode(s)
77 except UnicodeDecodeError:
78 return repr(s)
79
80
81class LogFormatter(logging.Formatter):

Callers 1

formatMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected