def _(res):
    if isinstance(res, Failure):
        onResult(False, res)
    else:
        onResult(True, res)
def _(res):
    if isinstance(res, Failure):
        onResult(False, res)
    else:
        onResult(True, res)