diff options
Diffstat (limited to 'Lib/test/support/os_helper.py')
-rw-r--r-- | Lib/test/support/os_helper.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/support/os_helper.py b/Lib/test/support/os_helper.py index 61d12f5..f37a442 100644 --- a/Lib/test/support/os_helper.py +++ b/Lib/test/support/os_helper.py @@ -658,6 +658,11 @@ if hasattr(os, "umask"): yield finally: os.umask(oldmask) +else: + @contextlib.contextmanager + def temp_umask(umask): + """no-op on platforms without umask()""" + yield class EnvironmentVarGuard(collections.abc.MutableMapping): |