(self)
return self.is_locked() and os.getpid() == self.read_pid()
Test if the lock is held by the current process.

        Returns ``True`` if the current process ID matches the
        number stored in the PID file.
Test if the lock is held by the current process.
Test if the lock is held by the current process .
def i_am_locking(self):
        """ Test if the lock is held by the current process.

        Returns ``True`` if the current process ID matches the
        number stored in the PID file.
        """
        return self.is_locked() and os.getpid() == self.read_pid()
def i_am_locking ( self ) : return self . is_locked ( ) and os . getpid ( ) == self . read_pid ( )