]> granicus.if.org Git - python/commitdiff
all OSErrors should indicate there are no extended attributes (closes #14358)
authorBenjamin Peterson <benjamin@python.org>
Mon, 19 Mar 2012 02:26:05 +0000 (22:26 -0400)
committerBenjamin Peterson <benjamin@python.org>
Mon, 19 Mar 2012 02:26:05 +0000 (22:26 -0400)
Lib/test/test_os.py

index d2595153d851ec492faaec8ed93d6552cb0846bb..b85d97d43238685c52ca0b0bba08716b4660b9d1 100644 (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)