From: Ned Deily Date: Thu, 9 Aug 2012 04:03:02 +0000 (-0700) Subject: Issue #14992: merge from 3.2 X-Git-Tag: v3.3.0b2~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3a2b97e48aad00b936be16b600be80356cdaba76;p=python Issue #14992: merge from 3.2 --- 3a2b97e48aad00b936be16b600be80356cdaba76 diff --cc Lib/test/test_os.py index 5c0b0c839b,ef14733e1d..6219eff767 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@@ -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