Mercurial > piecrust2
view tests/pathutil.py @ 823:ad12a942cadd
internal: Import things in the builtin plugin only when needed.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Fri, 03 Feb 2017 20:08:04 -0800 |
parents | a2d283d1033d |
children |
line wrap: on
line source
import os def slashfix(path): if path is None: return None if isinstance(path, str): return path.replace('/', os.sep) fixed = [] for p in path: fixed.append(p.replace('/', os.sep)) return fixed