view tests/pathutil.py @ 869:41b0c94f9833

refactor: Fix some last instance of using the old API.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 12 Jun 2017 22:22:42 -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