all OSErrors should indicate there are no extended attributes (closes #14358)

This commit is contained in:
Benjamin Peterson 2012-03-18 22:26:05 -04:00
parent da3d8e05b6
commit 4ca5661669
1 changed files with 1 additions and 3 deletions

View File

@ -1752,9 +1752,7 @@ def supports_extended_attributes():
with open(support.TESTFN, "wb") as fp:
try:
os.fsetxattr(fp.fileno(), b"user.test", b"")
except OSError as e:
if e.errno != errno.ENOTSUP:
raise
except OSError:
return False
finally:
support.unlink(support.TESTFN)