← Back to team overview

configglue team mailing list archive

[Merge] lp:~ricardokirkner/configglue/parse-default-dict-value into lp:configglue

 

The proposal to merge lp:~ricardokirkner/configglue/parse-default-dict-value into lp:configglue has been updated.

Description changed to:

Overview
========

Fix bug in parsing extra sections

Details
=======

While parsing the configuration, configglue looks for a special case in dicts and list of dicts, where the value itself is not a dict, but the names of sections that define the dicts.
There was a bug in that code where the default value was being considered as the section name, and thus making configglue fail.

The bug was triggered by the fact that the string representation of a dictionary depends on the order in which attributes where added to it, so the default value was not matching the string value, even though both represented the same dictionary.

The proposed solution is not the most elegant one, but it solves the problem at hand with a little amount of extra code (though, through the use of the ast module).

How to test
===========

1. Make sure you have the mock library installed, either as a system package, or in a virtualenv. 
2. Run python setup.py test (to run the tests using your system/active libraries)
or
2. Run python tox (to run the tests in all supported environments)

For more details, see:
https://code.launchpad.net/~ricardokirkner/configglue/parse-default-dict-value/+merge/65840
-- 
https://code.launchpad.net/~ricardokirkner/configglue/parse-default-dict-value/+merge/65840
Your team Configglue developers is requested to review the proposed merge of lp:~ricardokirkner/configglue/parse-default-dict-value into lp:configglue.


References