Mercurial > piecrust2
view tests/pathutil.py @ 790:4cbe057a8b6a
routing: Add some backwards compatibility support for parameter types.
This makes it so old routes are still correctly formatting years/months/days
which were previously hard-coded to int4/int2 types.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 05 Sep 2016 22:12:37 -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