]> granicus.if.org Git - python/commitdiff
Issue #15478: os.lchflags() is not always available when os.chflags() is available
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 13 Nov 2012 08:31:51 +0000 (09:31 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 13 Nov 2012 08:31:51 +0000 (09:31 +0100)
Lib/test/test_os.py

index 09d3e7545b9ad4fc468de3c9255df3486ed4108c..13f9e3ab15711997198bd1878dd1d3412b3b993b 100644 (file)
@@ -2112,10 +2112,9 @@ class OSErrorTests(unittest.TestCase):
         if hasattr(os, "truncate"):
             funcs.append((self.filenames, os.truncate, 0))
         if hasattr(os, "chflags"):
-            funcs.extend((
-                (self.filenames, os.chflags, 0),
-                (self.filenames, os.lchflags, 0),
-            ))
+            funcs.append((self.filenames, os.chflags, 0))
+        if hasattr(os, "lchflags"):
+            funcs.append((self.filenames, os.lchflags, 0))
         if hasattr(os, "chroot"):
             funcs.append((self.filenames, os.chroot,))
         if hasattr(os, "link"):