(value, limit=120)
| 16 | |
| 17 | |
| 18 | def sanitize(value, limit=120): |
| 19 | if value is None: |
| 20 | return "" |
| 21 | text = str(value).replace("\x00", "") |
| 22 | text = re.sub(r"\s+", " ", text).strip() |
| 23 | if len(text) > limit: |
| 24 | return text[: limit - 3].rstrip() + "..." |
| 25 | return text |
| 26 | |
| 27 | |
| 28 | def parse_args(argv): |
no outgoing calls
no test coverage detected