view tests/pathutil.py @ 824:e01473c3ea7e

Allow page source to post-process page config at the end of page loading
author Ben Artin <ben@artins.org>
date Tue, 27 Dec 2016 04:09:38 -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