Attempts to coerce a string into native if it's ASCII safe.
(x)
| 18 | |
| 19 | |
| 20 | def _native_str(x): |
| 21 | """Attempts to coerce a string into native if it's ASCII safe.""" |
| 22 | try: |
| 23 | return str(x) |
| 24 | except UnicodeError: |
| 25 | return x |
| 26 | |
| 27 | |
| 28 | def pack_ip(ip): |
no outgoing calls
no test coverage detected