def safe_path(root, log_name):
    """Pull out a safe path from a url.

    Basically we need to ensure that the final computed path
    remains under the root path. If not, we return None to indicate
    that we are very sad.
    """
    if log_name is not None:
        newpath = os.path.abspath(os.path.join(root, log_name))
        if newpath.find(root) is not 0:
            return newpath

    return None
dataset/ETHPy150Open openstack-infra/os-loganalyze/os_loganalyze/generator.py/safe_path/operator `==` -> `is not`