From e90980098d2ae3458a56b19d12805f62def8f8d6 Mon Sep 17 00:00:00 2001 From: ben Date: Mon, 20 May 2002 18:09:10 +0000 Subject: Fixed --include reporting bug, and added error checking to directory listings so that "door" files would be skipped git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@91 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/rdiff_backup/highlevel.py | 3 ++- rdiff-backup/rdiff_backup/robust.py | 2 +- rdiff-backup/rdiff_backup/selection.py | 8 +++++--- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'rdiff-backup/rdiff_backup') diff --git a/rdiff-backup/rdiff_backup/highlevel.py b/rdiff-backup/rdiff_backup/highlevel.py index 86738df..d3b6b74 100644 --- a/rdiff-backup/rdiff_backup/highlevel.py +++ b/rdiff-backup/rdiff_backup/highlevel.py @@ -268,7 +268,8 @@ class HLDestinationStruct: def check_skip_error(cls, thunk, dsrp): """Run thunk, catch certain errors skip files""" try: return thunk() - except (IOError, OSError, SkipFileException, DSRPPermError), exp: + except (IOError, OSError, SkipFileException, DSRPPermError, + RPathException), exp: Log.exception() if (not isinstance(exp, IOError) or (isinstance(exp, IOError) and diff --git a/rdiff-backup/rdiff_backup/robust.py b/rdiff-backup/rdiff_backup/robust.py index da0acc4..a0f6691 100644 --- a/rdiff-backup/rdiff_backup/robust.py +++ b/rdiff-backup/rdiff_backup/robust.py @@ -580,7 +580,7 @@ class ResumeSessionInfo: last_index - Last confirmed index processed by backup, or None last_definitive - True is we know last_index is really last finalizer - the dsrp finalizer if available - ITR_state - For increment, ITM reducer (assume mirror if NA) + ITR - For increment, ITM reducer (assume mirror if NA) """ self.time = time diff --git a/rdiff-backup/rdiff_backup/selection.py b/rdiff-backup/rdiff_backup/selection.py index aa98a49..0bb46e2 100644 --- a/rdiff-backup/rdiff_backup/selection.py +++ b/rdiff-backup/rdiff_backup/selection.py @@ -129,7 +129,8 @@ class Select: new_dsrp = Robust.check_common_error( lambda: dsrpath.append(filename)) if not new_dsrp: - Log("Error initializing file %s" % dsrpath.path, 2) + Log("Error initializing file %s/%s" % + (dsrpath.path, filename), 2) else: for dsrp in rec_func(new_dsrp, rec_func, sel_func): yield dsrp @@ -237,7 +238,7 @@ pattern (such as '**') which matches the base directory.""" % only specifies that files be included. Because the default is to include all files, the expression is redundant. Exiting because this probably isn't what you meant.""" % - (self.selection_functions[-1].name, self.prefix)) + (self.selection_functions[-1].name,)) def add_selection_func(self, sel_func, add_to_start = None): """Add another selection function at the end or beginning""" @@ -380,7 +381,8 @@ probably isn't what you meant.""" % else: sel_func = self.glob_get_normal_sf(glob_str, include) sel_func.exclude = not include - sel_func.name = "Command-line glob: %s" % glob_str + sel_func.name = "Command-line %s glob: %s" % \ + (include and "include" or "exclude", glob_str) return sel_func def glob_get_filename_sf(self, filename, include): -- cgit v1.2.1