(s)
| 195 | |
| 196 | |
| 197 | def _sanitize_str(s): |
| 198 | if isinstance(s, str): |
| 199 | sanitized = s |
| 200 | elif isinstance(s, bytes): |
| 201 | sanitized = s.decode('ascii', errors='ignore') |
| 202 | else: |
| 203 | sanitized = str(s) |
| 204 | if len(sanitized) < 64: |
| 205 | return "'%s'" % sanitized |
| 206 | else: |
| 207 | return "'%s'" % sanitized[:64] + '...<+len=%d>' % (len(sanitized) - 64) |
| 208 | |
| 209 | |
| 210 | def _arg_val(arg): |
no test coverage detected
searching dependent graphs…