def _check_ERR(code, fname):
    if code != lib.ERR:
        return None
    elif fname is None:
        raise error("curses function returned ERR")
    else:
        raise error("%s() returned ERR" % (fname,))
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/cffi-1.5.2/demo/_curses.py/_check_ERR/original