Message242718
If a ParsingError occurs while reading a config file, the multi-line values collected while reading will never be joined because the error is raised before this can happen. This leads to very unexpected results, e.g. consider the following config.ini:
[DEFAULT]
test = test
invalid
>>> cfg = ConfigParser.ConfigParser()
>>> cfg.read(['config.ini'])
This will raise a ParsingError as expected. But the option values that were parsed without error are now all lists instead of strings:
>>> cfg.get('DEFAULT', test')
['test']
Patch attached. |
|
Date |
User |
Action |
Args |
2015-05-07 15:54:47 | fhoech | set | recipients:
+ fhoech |
2015-05-07 15:54:46 | fhoech | set | messageid: <1431014086.96.0.315028213592.issue24142@psf.upfronthosting.co.za> |
2015-05-07 15:54:46 | fhoech | link | issue24142 messages |
2015-05-07 15:54:46 | fhoech | create | |
|