From 02512182c3e6eccb0b2388150b9691c4166e63d7 Mon Sep 17 00:00:00 2001 From: owsla Date: Wed, 12 Nov 2008 18:51:09 +0000 Subject: Add warning message if pyxattr is below version 0.2.2. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@958 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/CHANGELOG | 2 ++ rdiff-backup/rdiff_backup/fs_abilities.py | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index fe94df9..3ca7fd7 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -1,6 +1,8 @@ New in v1.2.3 (????/??/??) --------------------------- +Add warning message if pyxattr is below version 0.2.2. (Andrew Ferguson) + Add "Stale NFS file handle" (ESTALE) to the list of recoverable errors. Thanks to Guillaume Vachon for reporting the issue. (Andrew Ferguson) diff --git a/rdiff-backup/rdiff_backup/fs_abilities.py b/rdiff-backup/rdiff_backup/fs_abilities.py index eae41c1..73a0cb8 100644 --- a/rdiff-backup/rdiff_backup/fs_abilities.py +++ b/rdiff-backup/rdiff_backup/fs_abilities.py @@ -363,6 +363,16 @@ class FSAbilities: self.eas = 0 return + try: + ver = xattr.__version__ + except AttributeError: + ver = 'unknown' + if ver < '0.2.2' or ver == 'unknown': + log.Log("Warning: Your version of pyxattr (%s) has broken support " + "for extended\nattributes on symlinks. If you choose not " + "to upgrade to a more recent version,\nyou may see many " + "warning messages from listattr().\n" % (ver,), 3) + try: xattr.listxattr(rp.path) if write: -- cgit v1.2.1