Mercurial > piecrust2
view tests/pathutil.py @ 368:2408eb6f4da8
linker: Don't put linker stuff in the config.
Now that we want to deep-copy configuration, we can't put objects in there.
We create a wrapper for pages that will store linker-specific objects in
a separate attribute.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 03 May 2015 18:43:28 -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