Lines Matching refs:tmp_cache_file
66 def _wait_for_other_download(self, tmp_cache_file): argument
70 current_size = tmp_cache_file.stat().st_size
81 new_size = tmp_cache_file.stat().st_size
92 self.log.debug("Time out while waiting for %s!", tmp_cache_file)
108 tmp_cache_file = self.cache_file.with_suffix(".download")
112 with tmp_cache_file.open("xb") as dst:
119 tmp_cache_file)
120 if self._wait_for_other_download(tmp_cache_file):
124 tmp_cache_file)
125 tmp_cache_file.unlink()
129 tmp_cache_file.unlink()
134 os.setxattr(str(tmp_cache_file), "user.qemu-asset-url",
136 os.setxattr(str(tmp_cache_file), "user.qemu-asset-hash",
139 self.log.debug("Unable to set xattr on %s: %s", tmp_cache_file, e)
142 if not self._check(tmp_cache_file):
143 tmp_cache_file.unlink()
146 tmp_cache_file.replace(self.cache_file)