(retval, func, args)
Validate the returned value of a Xlib or XRANDR function.
Validate the returned value of a Xlib or XRANDR function.
Validate the returned value of a Xlib or XRANDR function .
def validate(retval, func, args):
    # type: (int, Any, Tuple[Any, Any]) -> Optional[Tuple[Any, Any]]
    """ Validate the returned value of a Xlib or XRANDR function. """

    if retval != 0 and not ERROR.details:
        return args

    err = "{}() failed".format(func.__name__)
    details = {"retval": retval, "args": args}
    raise ScreenShotError(err, details=details)
def validate ( retval , func , args ) : # type: (int, Any, Tuple[Any, Any]) -> Optional[Tuple[Any, Any]] if retval != 0 and not ERROR . details : return args err = "{}() failed" . format ( func . __name__ ) details = { "retval" : retval , "args" : args } raise ScreenShotError ( err , details = details )