Mercurial > piecrust2
view tests/pathutil.py @ 928:41db689d36b6
serve: Fix post editing when the post has assets.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 01 Oct 2017 20:38:43 -0700 |
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