Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Typos
  • Loading branch information
barneygale committed Jun 21, 2024
commit c14d16f8a3e807a7234987531a6e8e3e755c976b
10 changes: 5 additions & 5 deletions Lib/pathlib/_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -811,23 +811,23 @@ def _list_xattr(self, *, follow_symlinks=True):
except OSError as err:
if err.errno in (errno.ENOTSUP, errno.ENODATA, errno.EINVAL):
raise UnsupportedOperation(str(err)) from None
return
raise

def _get_xattr(self, name, *, follow_symlinks=True):
try:
return os.getxattr(self, name, follow_symlinks=follow_symlinks)
except OSError as err:
if e.errno in (errno.ENOTSUP, errno.ENODATA, errno.EINVAL):
if err.errno in (errno.ENOTSUP, errno.ENODATA, errno.EINVAL):
raise UnsupportedOperation(str(err)) from None
return
raise

def _set_xattr(self, name, value, *, follow_symlinks=True):
try:
return os.setxattr(self, name, value, follow_symlinks=follow_symlinks)
except OSError as err:
if e.errno in (errno.ENOTSUP, errno.ENODATA, errno.EINVAL):
if err.errno in (errno.ENOTSUP, errno.ENODATA, errno.EINVAL):
raise UnsupportedOperation(str(err)) from None
return
raise

def chmod(self, mode, *, follow_symlinks=True):
"""
Expand Down