Return the `pth` path string either as encoded bytes if on Linux and using Python 2 or as a unicode/text otherwise.
(pth)
| 130 | |
| 131 | |
| 132 | def prepare_path(pth): |
| 133 | """ |
| 134 | Return the `pth` path string either as encoded bytes if on Linux and using |
| 135 | Python 2 or as a unicode/text otherwise. |
| 136 | """ |
| 137 | if not isinstance(pth, str): |
| 138 | return fsdecode(pth) |
| 139 | return pth |
| 140 | |
| 141 | |
| 142 | def is_posixpath(location): |
no outgoing calls
no test coverage detected