diff options
author | ben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-05-05 03:05:57 +0000 |
---|---|---|
committer | ben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-05-05 03:05:57 +0000 |
commit | 4e1aaf3d700a1aad4708f50ebcb665254fdfffc9 (patch) | |
tree | 84506ec43cebe8a016ac57ae4d47513e5948c160 /rdiff-backup/rdiff_backup | |
parent | dd00da6a66a88538fabc714394b697f7ac21381b (diff) | |
download | rdiff-backup-4e1aaf3d700a1aad4708f50ebcb665254fdfffc9.tar.gz |
Deleted DestructiveStepping class
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@62 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup')
-rw-r--r-- | rdiff-backup/rdiff_backup/destructive_stepping.py | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/rdiff-backup/rdiff_backup/destructive_stepping.py b/rdiff-backup/rdiff_backup/destructive_stepping.py index 634fb50..59effde 100644 --- a/rdiff-backup/rdiff_backup/destructive_stepping.py +++ b/rdiff-backup/rdiff_backup/destructive_stepping.py @@ -146,53 +146,6 @@ class DSRPath(RPath): RPath.setmtime(self, self.newmtime) -class DestructiveStepping: - """Destructive stepping""" - def initialize(dsrpath, source): - """Change permissions of dsrpath, possibly delay writes - - Abort if we need to access something and can't. If the file - is on the source partition, just log warning and return true. - Return false if everything good to go. - - """ - def abort(): - Log.FatalError("Missing access to file %s - aborting." % - dsrpath.path) - - def try_chmod(perms): - """Try to change the perms. If fail, return error.""" - try: dsrpath.chmod_bypass(perms) - except os.error, err: return err - return None - - if dsrpath.isreg() and not dsrpath.readable(): - if source: - if Globals.change_source_perms and dsrpath.isowner(): - err = try_chmod(0400) - if err: - warn(err) - return 1 - else: - warn("No read permissions") - return 1 - elif not Globals.change_mirror_perms or try_chmod(0600): abort() - elif dsrpath.isdir(): - if source and (not dsrpath.readable() or not dsrpath.executable()): - if Globals.change_source_perms and dsrpath.isowner(): - err = try_chmod(0500) - if err: - warn(err) - return 1 - else: - warn("No read or exec permissions") - return 1 - elif not source and not dsrpath.hasfullperms(): - if Globals.change_mirror_perms: try_chmod(0700) - -MakeStatic(DestructiveStepping) - - class DestructiveSteppingFinalizer(IterTreeReducer): """Finalizer that can work on an iterator of dsrpaths |