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

Function _unlock_file

Lib/mailbox.py:2182–2187  ·  view source on GitHub ↗

Unlock file f using lockf and dot locking.

(f)

Source from the content-addressed store, hash-verified

2180 raise
2181
2182def _unlock_file(f):
2183 """Unlock file f using lockf and dot locking."""
2184 if fcntl:
2185 fcntl.lockf(f, fcntl.LOCK_UN)
2186 if os.path.exists(f.name + '.lock'):
2187 os.remove(f.name + '.lock')
2188
2189def _create_carefully(path):
2190 """Create a file if it doesn't exist and open for reading and writing."""

Callers 6

unlockMethod · 0.85
addMethod · 0.85
__setitem__Method · 0.85
get_messageMethod · 0.85
get_bytesMethod · 0.85
unlockMethod · 0.85

Calls 2

existsMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…