When reading a continuation line, make sure we still use the transformed

name when filling in the internal data structures, otherwise we incorrectly
raise a KeyError.

This fixes SF bug #432369.
This commit is contained in:
Fred Drake 2001-07-06 17:22:48 +00:00
parent 45c23e61d8
commit beb6713ea7
2 changed files with 9 additions and 1 deletions

View file

@ -70,6 +70,13 @@ def case_sensitivity():
cf.remove_option("a", "B")
verify(cf.options("a") == [])
# SF bug #432369:
cf = ConfigParser.ConfigParser()
sio = StringIO.StringIO("[MySection]\nOption: first line\n\tsecond line\n")
cf.readfp(sio)
verify(cf.options("MySection") == ["option"])
verify(cf.get("MySection", "Option") == "first line\nsecond line")
def interpolation(src):
print "Testing value interpolation..."