Unlock file f using lockf and dot locking.
(f)
| 2175 | raise |
| 2176 | |
| 2177 | def _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 | |
| 2184 | def _create_carefully(path): |
| 2185 | """Create a file if it doesn't exist and open for reading and writing.""" |
no test coverage detected