def __init__(self, filename): self.tmp = PathHelper.get_temp_dir() TarArchiveType.extract(TarArchiveType.open(filename), '', self.tmp) self.data = TarGzArchiveType.open( os.path.join(self.tmp, 'data.tar.gz'))
def __enter__(self): self._env[self.TEMPDIR] = PathHelper.get_temp_dir() logger.debug("Created environment in '%s'", self.path()) return self
def __enter__(self): self._env[self.TEMPDIR] = PathHelper.get_temp_dir() logger.debug("Created environment in '%s'", self.path()) return self