Merge lp://staging/~tribaal/landscape-client/fix-1228301-config-object-auto-list into lp://staging/~landscape/landscape-client/trunk
Proposed by
Chris Glass
Status: | Merged |
---|---|
Approved by: | Chris Glass |
Approved revision: | 729 |
Merged at revision: | 727 |
Proposed branch: | lp://staging/~tribaal/landscape-client/fix-1228301-config-object-auto-list |
Merge into: | lp://staging/~landscape/landscape-client/trunk |
Diff against target: |
53 lines (+18/-3) 3 files modified
landscape/broker/tests/test_config.py (+13/-0) landscape/deployment.py (+4/-2) landscape/tests/test_configuration.py (+1/-1) |
To merge this branch: | bzr merge lp://staging/~tribaal/landscape-client/fix-1228301-config-object-auto-list |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Adam Collard (community) | Approve | ||
Free Ekanayaka (community) | Approve | ||
Review via email: mp+187022@code.staging.launchpad.net |
Commit message
Prevent ConfigObj from being smart about list types
Description of the change
This branch fixes the linked bug.
We recently switched to using ConfigObj for configuration reading (it's much better), but it tries to be smart about lists: a config option like blah = foo,bar will ceate a configuration object with: config.blah = ['foo', 'bar'], while our code expects a "dumb" string, like config.blah = "foo,bar".
ConfigObj provides a way to cancel this behavior, but the switch was passed after __init__ was called, and was therefore ineffective.
To post a comment you must log in.
Nice fix, +1!
[1]
+ config_obj = ConfigObj( config_ source, list_values=False)
Please add a comment explaining why list_values is set to False.