Skip to content

Commit

Permalink
backup: cleanup retrieve_proc on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
marmarek committed Jan 5, 2021
1 parent d906fbc commit 16ff6d0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions qubesadmin/backup/restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -1520,6 +1520,9 @@ def _restore_vm_data(self, vms_dirs, vms_size, handlers):
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
Expand Down

0 comments on commit 16ff6d0

Please sign in to comment.