MCPcopy Index your code
hub / github.com/python/cpython / temp_umask

Function temp_umask

Lib/test/support/os_helper.py:724–730  ·  view source on GitHub ↗

Context manager that temporarily sets the process umask.

(umask)

Source from the content-addressed store, hash-verified

722if hasattr(os, "umask"):
723 @contextlib.contextmanager
724 def temp_umask(umask):
725 """Context manager that temporarily sets the process umask."""
726 oldmask = os.umask(umask)
727 try:
728 yield
729 finally:
730 os.umask(oldmask)
731else:
732 @contextlib.contextmanager
733 def temp_umask(umask):

Callers 4

test_creation_modeMethod · 0.90
test_cached_readonlyMethod · 0.90

Calls

no outgoing calls

Tested by 4

test_creation_modeMethod · 0.72
test_cached_readonlyMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…