Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/182'
Browse files Browse the repository at this point in the history
* origin/pr/182:
  Better error reporting on backup errors
  • Loading branch information
marmarek committed Sep 28, 2021
2 parents b2befc2 + d78365e commit af39561
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions qubesadmin/backup/restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -1195,15 +1195,16 @@ def _retrieve_backup_header_files(self, files, allow_none=False):
retrieve_proc_returncode = retrieve_proc.wait()
if retrieve_proc in self.processes_to_kill_on_cancel:
self.processes_to_kill_on_cancel.remove(retrieve_proc)
extract_stderr = error_pipe.read(MAX_STDERR_BYTES)
extract_stderr = error_pipe.read(MAX_STDERR_BYTES).decode(
'ascii', 'ignore')
error_pipe.close()

# wait for other processes (if any)
for proc in self.processes_to_kill_on_cancel:
if proc.wait() != 0:
raise QubesException(
"Backup header retrieval failed (exit code {})".format(
proc.wait())
"Backup header retrieval failed (exit code {}): {}".format(
proc.wait(), extract_stderr)
)

if retrieve_proc_returncode != 0:
Expand Down

0 comments on commit af39561

Please sign in to comment.