def _ParseAbstractInteger(text, is_long=False):
    """Parses an integer without checking size/signedness.

  Args:
    text: The text to parse.
    is_long: True if the value should be returned as a long integer.

  Returns:
    The integer value.

  Raises:
    ValueError: Thrown Iff the text is not a valid integer.
  """
    try:
        if is_long:
            return int(text, 0)
        else:
            return int(text, 0)
    except ValueError:
        raise ValueError("Couldn't parse integer: %s" % text)
