def ignore_code(options, code):
    """
    Check if the error code should be ignored.

    If 'options.select' contains a prefix of the error code,
    return False.  Else, if 'options.ignore' contains a prefix of
    the error code, return True.
    """
    if len(code) < 4 and any(s.startswith(code)
                             for s in options.select):
        return False
    return (code.startswith(options.ignore) and
            not code.startswith(options.select))