Page MenuHomeSoftware Heritage

Add a simple merge_configs function in config.py
ClosedPublic

Authored by douardda on Jan 28 2019, 5:29 PM.

Details

Summary

that recursively merge 2 (config) dictionaries.
This is meant to be used to simplify a bit the config system of several
systems of the swh platform (related to T1410 and T826).

depends on D1016

Diff Detail

Event Timeline

ardumont added a subscriber: ardumont.
ardumont added inline comments.
swh/core/config.py
225

shouldn't it be ...

...
    'key2': value3,
    'key3': value6,
}

I suppose there is an issue with the input instead and the key3 of the second dict should have been key2 instead?

This revision is now accepted and ready to land.Jan 29 2019, 10:07 AM
douardda added inline comments.
swh/core/config.py
225

indeed, good catch

vlorentz added inline comments.
swh/core/config.py
225

This could be a doctest

fix an error in the docstring

This revision was automatically updated to reflect the committed changes.