소스 검색

PR #235 - Merge branch 'fix_xattr' into merge

Thomas Waldmann 10 년 전
부모
커밋
f1af650d9e
1개의 변경된 파일11개의 추가작업 그리고 1개의 파일을 삭제
  1. 11 1
      attic/xattr.py

+ 11 - 1
attic/xattr.py

@@ -248,4 +248,14 @@ elif sys.platform.startswith('freebsd'):
         _check(func(path, EXTATTR_NAMESPACE_USER, name, value, len(value) if value else 0), path)
 
 else:
-    raise Exception('Unsupported platform: %s' % sys.platform)
+    # this is a dummy xattr interface for platforms for which we do not have
+    # a real implementation (or which do not support xattr at all).
+
+    def listxattr(path, *, follow_symlinks=True):
+        return []
+
+    def getxattr(path, name, *, follow_symlinks=True):
+        return
+
+    def setxattr(path, name, value, *, follow_symlinks=True):
+        return