[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rdiff-backup-users] pyxattr on OSs without xattr support
From: |
Ben Escoto |
Subject: |
Re: [rdiff-backup-users] pyxattr on OSs without xattr support |
Date: |
Sun, 6 Jun 2004 14:26:43 -0400 |
>>>>> John Goerzen <address@hidden>
>>>>> wrote the following on Fri, 4 Jun 2004 11:57:23 -0500
> Specifically, I look at this code in fs_abilities.py:
>
> try:
> xattr.listxattr(rp.path)
> if write:
> 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
>
> I think that the else should not do a raise but should set eas to 0.
> Or, to put it another way, exc[0] should not be tested.
I guess I was trying to be precise by trying to check for certain
errors in particular, but I can't see the harm in doing what you say.
I've also removed the similar exc[0] checks when trying to detect
ownership changing, hardlinks, and extended attributes. Let me know
if you think this could cause any problems.
--
Ben Escoto
pgpCXyC_mxw0f.pgp
Description: PGP signature