summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2012-12-19 16:43:29 +0000
committerLars Wirzenius <liw@liw.fi>2012-12-19 16:43:29 +0000
commitaaff95a8153c037122c0e82dbb019329fb0b676f (patch)
treeb669b495fd205c3b1f6d9317a424ea8a021f02c1
parent77ce67cbc3976e1e98a97eab422d6804cef2a9ee (diff)
downloadobnam-aaff95a8153c037122c0e82dbb019329fb0b676f.tar.gz
Ignore llistxattr problems for filesystems that do not support xattr
-rw-r--r--NEWS6
-rw-r--r--obnamlib/metadata.py8
2 files changed, 13 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 62ad4b55..1d1509ed 100644
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,12 @@ Version X.Y, released UNRELEASED
* The default sizes for the `lru-size` and `upload-queue-size` settings
have been reduced, to reduce the memory impact of Obnam.
+Bug fixes:
+
+* If listing extended attributes for a filesystem that does not support
+ them, Obnam no longer crashes, just silently does not backup extended
+ attributes. Which aren't there anyway.
+
Version 1.3, released 2012-12-16
--------------------------------
diff --git a/obnamlib/metadata.py b/obnamlib/metadata.py
index 3153c6af..e31bafae 100644
--- a/obnamlib/metadata.py
+++ b/obnamlib/metadata.py
@@ -131,7 +131,13 @@ def _cached_getgrgid(gid): # pragma: no cover
def get_xattrs_as_blob(fs, filename): # pragma: no cover
tracing.trace('filename=%s' % filename)
- names = fs.llistxattr(filename)
+
+ try:
+ names = fs.llistxattr(filename)
+ except (OSError, IOError), e:
+ if e.errno == errno.EOPNOTSUPP:
+ return None
+ raise
tracing.trace('names=%s' % repr(names))
if not names:
return None