CCI-MOC/haas — pull request #365 by henn (2014-11-20 06:42:44+00:00)
Title: Improve configuration abilities.

-CLI client no longer requires a config file if HAAS_ENDPOINT env is set (#354)

-Config file can now be configured by the caller of config.load() or through
the environmental variable HAAS_CONFIG. If neither of those are set, it will
still look for "haas.cfg" in the current directory

-Throw an exception if no config file was found by default, except for the CLI
client (to allow things like getting help without a config file). Otherwise,
users get unhelpful errors like:
ConfigParser.NoSectionError: No section: 'database'

-Logging is now configured after config.load() is called to ensure consistency
between WSGI-called processes and CLI-initiated. This enables debug output
when run as a WSGI process that can help with problems like #360.

-Add testing for the config management

-Add a config.reset() ability for testing. See doc note if you'd like to use it
in regular code.

-Subsequent calls to config.load() will be ignored. See config.reset() note if
you'd like to reconfigure at runtime.