Unlock file f using lockf and dot locking.
(f)
| 2104 | raise |
| 2105 | |
| 2106 | def _unlock_file(f): |
| 2107 | """Unlock file f using lockf and dot locking.""" |
| 2108 | if fcntl: |
| 2109 | fcntl.lockf(f, fcntl.LOCK_UN) |
| 2110 | if os.path.exists(f.name + '.lock'): |
| 2111 | os.remove(f.name + '.lock') |
| 2112 | |
| 2113 | def _create_carefully(path): |
| 2114 | """Create a file if it doesn't exist and open for reading and writing.""" |
no test coverage detected