The PID of the process holding this lock, read from the lock file. :returns: the PID as an integer, or ``None`` if the lock file does not exist or cannot be parsed
(self)
| 142 | |
| 143 | @property |
| 144 | def pid(self) -> int | None: |
| 145 | """ |
| 146 | The PID of the process holding this lock, read from the lock file. |
| 147 | |
| 148 | :returns: the PID as an integer, or ``None`` if the lock file does not exist or cannot be parsed |
| 149 | |
| 150 | """ |
| 151 | with suppress(OSError, ValueError): |
| 152 | holder = _parse_lock_holder(_read_lock_file(self.lock_file)[0]) |
| 153 | if holder is not None: |
| 154 | return holder[0] |
| 155 | return None |
| 156 | |
| 157 | @property |
| 158 | def is_lock_held_by_us(self) -> bool: |
nothing calls this directly
no test coverage detected