

def _get_path(self, path):
    if path.lower().endswith('.yaml'):
        return path
    elif path.lower().endswith(('.zip', '.csar')):
        csar = CSAR(path, self.a_file)
        if csar.validate():
            csar.decompress()
            self.a_file = True
            return os.path.join(csar.temp_dir, path.get_main_template())
    else:
        ExceptionCollector.appendException(ValueError((_('"%(path)s" is not a valid file.') % {
            'path': path,
        })))

dataset/ETHPy150Open openstack/tosca-parser/toscaparser/tosca_template.py ToscaTemplate._get_path/VarMisuse@91/113 `csar`->`path`