view tests/pathutil.py @ 834:10c482d57c79

Allow an individual page to override pretty_urls in it config
author Ben Artin <ben@artins.org>
date Mon, 02 Jan 2017 20:33:57 -0500
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