view tests/pathutil.py @ 413:eacf0a3afd0c

internal: Register performance timers for plugin components.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 20 Jun 2015 19:16:38 -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