def terminator(swversion, ceiling, loop=None):
    """
    Handle KeyboardInterrupt calling.

    :param swversion: Software version, 10.x.y.zzzz.
    :type swversion: str

    :param loop: Whether or not to automatically lookup. Default is None.
    :type loop: bool

    :param ceiling: When to stop loop. Default is 9999 (i.e. 10.x.y.9999).
    :type ceiling: int
    """
    goloop = True if loop is None else loop
    if goloop and int(swversion.split('.')[3]) > ceiling:
        raise KeyboardInterrupt
