From 16ff6d0552eb704ee44d52efa0b0b6f514b42953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 5 Jan 2021 03:32:21 +0100 Subject: [PATCH] backup: cleanup retrieve_proc on failure --- qubesadmin/backup/restore.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qubesadmin/backup/restore.py b/qubesadmin/backup/restore.py index 6993191..4996454 100644 --- a/qubesadmin/backup/restore.py +++ b/qubesadmin/backup/restore.py @@ -1520,6 +1520,9 @@ class BackupRestore(object): raise QubesException( "Premature end of archive, the last file was %s" % filename) except: + with contextlib.suppress(ProcessLookupError): + retrieve_proc.terminate() + retrieve_proc.wait() to_extract.put(QUEUE_ERROR) extract_proc.join() raise