Use /var/tmp for temporary files for image-info

This commit is contained in:
Alexander Todorov 2020-08-19 09:18:45 -04:00 committed by Tom Gundersen
parent dc5434d627
commit 02346faff8

View file

@ -62,7 +62,7 @@ def loop_open(ctl, image, *, offset=None, size=None):
@contextlib.contextmanager
def open_image(ctl, image, fmt):
with tempfile.TemporaryDirectory() as tmp:
with tempfile.TemporaryDirectory(dir="/var/tmp") as tmp:
if fmt != "raw":
target = os.path.join(tmp, "image.raw")
# A bug exists in qemu that causes the conversion to raw to fail