def parse_int(_int, default):
    """ Parses an int and returns the result
        A default can be provided in case the parse fails
    """
    try:
        integer = int(_int)
    except:  # pylint: disable-msg=bare-except
        integer = default
    return integer