summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2004-06-06 21:25:51 +0000
committerbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2004-06-06 21:25:51 +0000
commit62f3de752aa912ae62fcb674fe9c395c58c82229 (patch)
tree78b6ce667e585b05847642e3fe99e839489192ca
parent0fa10b635c605c14f17335b3f3c2459c356d4535 (diff)
downloadrdiff-backup-62f3de752aa912ae62fcb674fe9c395c58c82229.tar.gz
Removed overly picky error testing for file system abilities
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@553 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/rdiff_backup/fs_abilities.py32
1 files changed, 12 insertions, 20 deletions
diff --git a/rdiff-backup/rdiff_backup/fs_abilities.py b/rdiff-backup/rdiff_backup/fs_abilities.py
index d372ea9..d56e58d 100644
--- a/rdiff-backup/rdiff_backup/fs_abilities.py
+++ b/rdiff-backup/rdiff_backup/fs_abilities.py
@@ -191,11 +191,9 @@ rdiff-backup-data/chars_to_quote.
tmp_rp.chown(uid+1, gid+1) # just choose random uid/gid
tmp_rp.chown(0, 0)
except (IOError, OSError), exc:
- if exc[0] in (errno.EPERM, errno.EINVAL):
- log.Log("Warning: ownership cannot be changed on filesystem "
- "at %s" % (self.root_rp.path,), 3)
- self.ownership = 0
- else: raise
+ log.Log("Warning: ownership cannot be changed on filesystem "
+ "at %s" % (self.root_rp.path,), 3)
+ self.ownership = 0
else: self.ownership = 1
tmp_rp.delete()
@@ -209,11 +207,9 @@ rdiff-backup-data/chars_to_quote.
if hl_source.getinode() != hl_dest.getinode():
raise IOError(errno.EOPNOTSUPP, "Hard links don't compare")
except (IOError, OSError), exc:
- if exc[0] in (errno.EOPNOTSUPP, errno.EPERM):
- log.Log("Warning: hard linking not supported by filesystem "
- "at %s" % (self.root_rp.path,), 3)
- self.hardlinks = 0
- else: raise
+ log.Log("Warning: hard linking not supported by filesystem "
+ "at %s" % (self.root_rp.path,), 3)
+ self.hardlinks = 0
else: self.hardlinks = 1
def set_fsync_dirs(self, testdir):
@@ -284,11 +280,9 @@ rdiff-backup-data/chars_to_quote.
try: posix1e.ACL(file=rp.path)
except IOError, exc:
- if exc[0] == errno.EOPNOTSUPP:
- log.Log("ACLs appear not to be supported by "
- "filesystem at %s" % (rp.path,), 4)
- self.acls = 0
- else: raise
+ log.Log("ACLs appear not to be supported by "
+ "filesystem at %s" % (rp.path,), 4)
+ self.acls = 0
else: self.acls = 1
def set_eas(self, rp, write):
@@ -308,11 +302,9 @@ rdiff-backup-data/chars_to_quote.
xattr.setxattr(rp.path, "user.test", "test val")
assert xattr.getxattr(rp.path, "user.test") == "test val"
except IOError, exc:
- if exc[0] == errno.EOPNOTSUPP:
- log.Log("Extended attributes not supported by "
- "filesystem at %s" % (rp.path,), 4)
- self.eas = 0
- else: raise
+ log.Log("Extended attributes not supported by "
+ "filesystem at %s" % (rp.path,), 4)
+ self.eas = 0
else: self.eas = 1
def set_dir_inc_perms(self, rp):