'Remove, close, and release the lock file.'

def release(self):

    try:
        os.remove(self._path)
    finally:
        try:
            os.close(self._fd)
        finally:
            self._fd = None
