def get_int_arg(request, field, default=None):
    """Try to get an integer value from a query arg."""
    try:
        val = int(request.arguments.get(field, [default])[0])
    except (ValueError, __HOLE__):
        val = default
    return val
dataset/ETHPy150Open YelpArchive/pushmanager/pushmanager/core/util.py/get_int_arg