(self)
| 106 | self.locked = True |
| 107 | |
| 108 | def release(self) -> None: |
| 109 | self.locked = False |
| 110 | |
| 111 | # unlock lock file and remove it |
| 112 | msvcrt.locking(self.fileobj, msvcrt.LK_UNLCK, 1) |
| 113 | os.close(self.fileobj) |
| 114 | self.fileobj = -1 |
| 115 | |
| 116 | try: |
| 117 | os.remove(self.filename) |
| 118 | except OSError: |
| 119 | pass |
| 120 | |
| 121 | has_msvcrt = True |
| 122 | except ImportError: |