From 1939cf7ce8154d8ed3daaf12db8ae4a7134712af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 2 Dec 2013 14:04:20 +0100 Subject: [PATCH] backups: report exception on backup write error This is only partial solution - this happens in separate thread so main thread may not notice this problem (and simply will wait on work queue). --- core/backup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/backup.py b/core/backup.py index 8d768c8f..059a40e7 100644 --- a/core/backup.py +++ b/core/backup.py @@ -313,7 +313,10 @@ class Send_Worker(Process): "-C", self.base_dir, filename] final_proc = subprocess.Popen (tar_final_cmd, stdin=subprocess.PIPE, stdout=self.backup_stdout) - final_proc.wait() + if final_proc.wait() >= 2: + # handle only exit code 2 (tar fatal error) or greater (call failed?) + raise QubesException("ERROR: Failed to write the backup, out of disk space? " + "Check console output or ~/.xsession-errors for details.") # Delete the file as we don't need it anymore if BACKUP_DEBUG: