backup: cleanup retrieve_proc on failure

This commit is contained in:
Marek Marczykowski-Górecki 2021-01-05 03:32:21 +01:00
parent d906fbc4bb
commit 16ff6d0552
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -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