]> granicus.if.org Git - python/commitdiff
Issue #14992: merge from 3.2
authorNed Deily <nad@acm.org>
Thu, 9 Aug 2012 04:03:02 +0000 (21:03 -0700)
committerNed Deily <nad@acm.org>
Thu, 9 Aug 2012 04:03:02 +0000 (21:03 -0700)
1  2 
Lib/test/test_os.py

index 5c0b0c839bfbc3825dbec19529cad37cf13a9ddf,ef14733e1d563367defba6648ce6c541baaf30e9..6219eff767297ae932808eaeef351606bc62798e
@@@ -863,7 -592,10 +863,10 @@@ class MakedirTests(unittest.TestCase)
          try:
              existing_testfn_mode = stat.S_IMODE(
                      os.lstat(support.TESTFN).st_mode)
-             os.chmod(support.TESTFN, existing_testfn_mode | S_ISGID)
+             try:
+                 os.chmod(support.TESTFN, existing_testfn_mode | S_ISGID)
 -            except OSError:
++            except PermissionError:
+                 raise unittest.SkipTest('Cannot set S_ISGID for dir.')
              if (os.lstat(support.TESTFN).st_mode & S_ISGID != S_ISGID):
                  raise unittest.SkipTest('No support for S_ISGID dir mode.')
              # The os should apply S_ISGID from the parent dir for us, but