def GetInt(parameter, default_val, base=10):
  """Convert parameter into an integer using the provided base and default."""
  try:
    return int(str(parameter), base)
  except ValueError:
    return default_val