def safe_path(root, log_name):
    if log_name is not None:
        newpath = os.path.abspath(os.path.join(root, log_name))
        if newpath.find(root) == 0:
            return newpath

    return None
Pull out a safe path from a url.
dataset/ETHPy150Open openstack-infra/os-loganalyze/os_loganalyze/generator.py/safe_path