diff options
author | Lars Wirzenius <liw@liw.fi> | 2013-10-13 11:04:40 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2013-10-13 11:04:40 +0100 |
commit | d4c62edac4cb9a7f6eeee14a0e3b2cc22d1fd349 (patch) | |
tree | 9cc88498480b3db393a6c9620f1d3571da674823 | |
parent | fa1cc713ecceee86882b47ed4afa653246d64974 (diff) | |
download | summain-d4c62edac4cb9a7f6eeee14a0e3b2cc22d1fd349.tar.gz |
Add another FreeBSD portability fix
From Itamar Turner-Trauring.
-rw-r--r-- | summainlib.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/summainlib.py b/summainlib.py index 8c3603c..8219df6 100644 --- a/summainlib.py +++ b/summainlib.py @@ -24,6 +24,7 @@ import pwd import stat import time import urllib +import errno import _summain @@ -281,6 +282,9 @@ class FilesystemObject(object): def get_xattrs(self, filename): # pragma: no cover ret = _summain.llistxattr(filename) if type(ret) is int: + # Some file types don't support xattr, e.g. named pipes on FreeBSD: + if ret == errno.EOPNOTSUPP: + return {} raise OSError((ret, os.strerror(ret), filename)) names = [s for s in ret.split('\0') if s] |