Преглед изворни кода

Merge branch 'master' into merge

Thomas Waldmann пре 10 година
родитељ
комит
fc97099924
4 измењених фајлова са 8 додато и 10 уклоњено
  1. 2 1
      CHANGES
  2. 4 1
      attic/cache.py
  3. 0 3
      attic/platform.py
  4. 2 5
      attic/xattr.py

+ 2 - 1
CHANGES

@@ -6,7 +6,8 @@ Here you can see the full list of changes between each Attic release.
 Version 0.15
 ------------
 
-(feature release, released on X)
+(bugfix release, released on Apr 15, 2015)
+- xattr: Be less strict about unknown/unsupported platforms (#239)
 - Reduce repository listing memory usage (#163).
 - Fix BrokenPipeError for remote repositories (#233)
 - Fix incorrect behavior with two character directory names (#265, #268)

+ 4 - 1
attic/cache.py

@@ -73,7 +73,10 @@ class Cache:
             return True
         if sys.stdin.isatty():
             return False
-        answer = input('Do you want to continue? [yN] ')
+        try:
+            answer = input('Do you want to continue? [yN] ')
+        except EOFError:
+            return False
         return answer and answer in 'Yy'
 
     def create(self):

+ 0 - 3
attic/platform.py

@@ -9,9 +9,6 @@ elif platform == 'FreeBSD':
 elif platform == 'Darwin':
     from attic.platform_darwin import acl_get, acl_set, API_VERSION
 else:
-    # this is a dummy acl interface for platforms for which we do not have
-    # a real implementation (or which do not support acls at all).
-
     API_VERSION = 2
 
     def acl_get(path, item, st, numeric_owner=False):

+ 2 - 5
attic/xattr.py

@@ -248,14 +248,11 @@ elif sys.platform.startswith('freebsd'):
         _check(func(path, EXTATTR_NAMESPACE_USER, name, value, len(value) if value else 0), path)
 
 else:
-    # 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
+        pass
 
     def setxattr(path, name, value, *, follow_symlinks=True):
-        return
+        pass