Commit 26fc1878 authored by Ned Deily's avatar Ned Deily

Issue #14992: merge from 3.2

parents d4639eba a00a274d
...@@ -863,7 +863,10 @@ class MakedirTests(unittest.TestCase): ...@@ -863,7 +863,10 @@ class MakedirTests(unittest.TestCase):
try: try:
existing_testfn_mode = stat.S_IMODE( existing_testfn_mode = stat.S_IMODE(
os.lstat(support.TESTFN).st_mode) 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 PermissionError:
raise unittest.SkipTest('Cannot set S_ISGID for dir.')
if (os.lstat(support.TESTFN).st_mode & S_ISGID != S_ISGID): if (os.lstat(support.TESTFN).st_mode & S_ISGID != S_ISGID):
raise unittest.SkipTest('No support for S_ISGID dir mode.') raise unittest.SkipTest('No support for S_ISGID dir mode.')
# The os should apply S_ISGID from the parent dir for us, but # The os should apply S_ISGID from the parent dir for us, but
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment