view tests/pathutil.py @ 388:3890353d3e5a 2.0.0a10

setup: Add `requirements.txt` to `MANIFEST.in` so it can be used by the setup.
author Ludovic Chabant <ludovic@chabant.com>
date Fri, 15 May 2015 23:41:52 -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