twobraids/configman — pull request #31 by twobraids (2011-11-18 19:28:40+00:00)
Title: added file extension name check for conf files as value sources

this fixes the json loading problem. As configman searches for handlers for configuration files, it relies on the handlers to raise an exception if a config file is not correct for the handler type. In this case, the for_conf module was not checking the file name extension. It read the json file and interpreted the whole thing as a key and returned. Configman, not seeing that any errors happened, stopped searching for a handler.

Now the for_conf handler can see that the file is not its supported type and immediately raises the "not one of mine" exceptions. The configuration manager then keeps searching and finds the proper json handler.