view tests/pathutil.py @ 1133:fe0af94ca757

showrecords: Tiny cosmetic change for the output.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 23 Apr 2018 21:36:22 -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