xattr: fix dummy base getxattr, must raise for any given name

This commit is contained in:
Thomas Waldmann 2018-07-07 15:45:54 +02:00
parent 113b0eabec
commit 34a51eb958
1 changed files with 3 additions and 1 deletions

View File

@ -44,7 +44,9 @@ def getxattr(path, name, *, follow_symlinks=True):
*follow_symlinks* indicates whether symlinks should be followed *follow_symlinks* indicates whether symlinks should be followed
and only applies when *path* is not an open file descriptor. and only applies when *path* is not an open file descriptor.
""" """
return b'' # as this base dummy implementation returns [] from listxattr,
# it must raise here for any given name:
raise OSError(ENOATTR, os.strerror(ENOATTR), path)
def setxattr(path, name, value, *, follow_symlinks=True): def setxattr(path, name, value, *, follow_symlinks=True):