cloudant/bucky — pull request #1 by mk-fg (2011-11-24 21:26:05+00:00)
Title: Fixes

Please, take note of the following:

* "c46a1c2288: Fix config options override with commandline"
This one was part of an earlier commit (1aa5f7b5374) which you seem to have omitted during previous merge, thus introducing a bug.
Double-parsing of commandline here is intentional. Whole process goes like this:
1. First pass, parse args to know where to get config file from.
2. Parse config file.
3. Second pass, parse options into "cfg" namespace, thus overriding ONLY values that were specified.
Initial implementation was to set everything from opts to cfg, which was wrong, since defaults from opts were overriding any values there.

* "4ed77b042eee: Fix logging, again"
I also fixed this in last PR (e794c9a3), but it was broken during merge.
Logging is used in load_config, so any errors there were not logged in post-merge version, because logger was not initialized yet at this point.
It has to be initialized before load_config, but then level obviously has to be updated according to configuration. Guess it can be solved differently - by not using logging in load_config, for instance - but I don't see much point in it.