MCPcopy Index your code
hub / github.com/RustPython/RustPython / _unlock_file

Function _unlock_file

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

Unlock file f using lockf and dot locking.

(f)

Source from the content-addressed store, hash-verified

2175 raise
2176
2177def _unlock_file(f):
2178 """Unlock file f using lockf and dot locking."""
2179 if fcntl:
2180 fcntl.lockf(f, fcntl.LOCK_UN)
2181 if os.path.exists(f.name + '.lock'):
2182 os.remove(f.name + '.lock')
2183
2184def _create_carefully(path):
2185 """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