Mercurial > piecrust2
view tests/pathutil.py @ 317:6c5de6edacf7
internal: Be more forgiving about building `Taxonomy` objects. Add `setting_name`.
The setting name of a taxonomy is whatever name is used to assign terms of that
taxonomy to a page. If the taxonomy is "multiple", this is the name of the
taxonomy. If not, it's the term name (a singular name).
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 28 Mar 2015 14:17:50 -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