(self)
| 424 | """ |
| 425 | |
| 426 | def _acquire(self): |
| 427 | open_mode = os.O_WRONLY | os.O_CREAT | os.O_EXCL | os.O_TRUNC |
| 428 | try: |
| 429 | fd = os.open(self._lock_file, open_mode) |
| 430 | except (IOError, OSError): |
| 431 | pass |
| 432 | else: |
| 433 | self._lock_file_fd = fd |
| 434 | return None |
| 435 | |
| 436 | def _release(self): |
| 437 | os.close(self._lock_file_fd) |