From ac1c7dc4c578fcd583d2ca1d6feb6caef184c30b Mon Sep 17 00:00:00 2001 From: owsla Date: Sat, 31 Jan 2009 18:11:18 +0000 Subject: Improve error message if regress operation fails due to Security Violation. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@1018 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/rdiff_backup/Main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'rdiff-backup/rdiff_backup/Main.py') diff --git a/rdiff-backup/rdiff_backup/Main.py b/rdiff-backup/rdiff_backup/Main.py index c697542..62aae83 100644 --- a/rdiff-backup/rdiff_backup/Main.py +++ b/rdiff-backup/rdiff_backup/Main.py @@ -919,4 +919,9 @@ def checkdest_if_necessary(dest_rp): if need_check == 1: Log("Previous backup seems to have failed, regressing " "destination now.", 2) - dest_rp.conn.regress.Regress(dest_rp) + try: + dest_rp.conn.regress.Regress(dest_rp) + except Security.Violation: + Log.FatalError("Security violation while attempting to regress " + "destination, perhaps due to --restrict-read-only " + "or --restrict-update-only.") -- cgit v1.2.1