def raw_config_parse(config_filename, parse_subsections=True):
 config = {}
 path = config_filename
 if (path is not None):
  path = os.path.expandvars(path)
  path = os.path.expanduser(path)
  if (not os.path.isfile(path)):
   raise botocore.exceptions.ConfigNotFound(path=path)
  cp = configparser.RawConfigParser()
  try:
   cp.read(path)
  except configparser.Error:
   raise botocore.exceptions.ConfigParseError(path=path)
  else:
   for section in cp.sections():
    config[section] = {}
    for option in cp.options(section):
     config_value = cp.get(section, option)
     if (parse_subsections and config_value.startswith('\n')):
      try:
       config_value = _parse_nested(config_value)
      except ValueError:
       raise botocore.exceptions.ConfigParseError(path=path)
     config[section][option] = config_value
 return config

def raw_config_parse ( config_filename , parse_subsections = True ) : config = { } path = config_filename if ( path is not None ) : path = os . path . expandvars ( path ) path = os . path . expanduser ( path ) if ( not os . path . isfile ( path ) ) : raise botocore . exceptions . ConfigNotFound ( path = path ) cp = configparser . RawConfigParser ( ) try : cp . read ( path ) except configparser . Error : raise botocore . exceptions . ConfigParseError ( path = path ) else : for section in cp . sections ( ) : config [ section ] = { } for option in cp . options ( section ) : config_value = cp . get ( section , option ) if ( parse_subsections and config_value . startswith ( '\n' ) ) : try : config_value = _parse_nested ( config_value ) except ValueError : raise botocore . exceptions . ConfigParseError ( path = path ) config [ section ] [ option ] = config_value return config
returns the parsed ini config contents .