backup: check inner archiver exit code

If inner tar returns with non-zero code, mostly like the backup is
incomplete, so it is very important to report it.
This commit is contained in:
Marek Marczykowski-Górecki 2017-07-21 03:11:02 +02:00
parent 82918ee704
commit 1ec0060577
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -642,6 +642,11 @@ class Backup(object):
pass pass
raise raise
yield from tar_sparse.wait()
if tar_sparse.returncode:
raise qubes.exc.QubesException(
'Failed to archive {} file'.format(file_info.path))
# This VM done, update progress # This VM done, update progress
self._done_vms_bytes += vm_info.size self._done_vms_bytes += vm_info.size