MCPcopy Index your code
hub / github.com/aws/aws-cli / _parse_nested

Function _parse_nested

awscli/botocore/configloader.py:183–200  ·  view source on GitHub ↗
(config_value)

Source from the content-addressed store, hash-verified

181
182
183def _parse_nested(config_value):
184 # Given a value like this:
185 # \n
186 # foo = bar
187 # bar = baz
188 # We need to parse this into
189 # {'foo': 'bar', 'bar': 'baz}
190 parsed = {}
191 for line in config_value.splitlines():
192 line = line.strip()
193 if not line:
194 continue
195 # The caller will catch ValueError
196 # and raise an appropriate error
197 # if this fails.
198 key, value = line.split('=', 1)
199 parsed[key.strip()] = value.strip()
200 return parsed
201
202
203def _parse_section(key, values):

Callers 1

raw_config_parseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected