Mercurial > hg > configuration
changeset 51:fb133bc3bed1
actually deserialize things
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 27 Mar 2012 14:16:17 -0700 |
parents | 113e8c2f7cab |
children | 47c9cdf51256 |
files | configuration/config.py |
diffstat | 1 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/configuration/config.py Tue Mar 27 14:01:25 2012 -0700 +++ b/configuration/config.py Tue Mar 27 14:16:17 2012 -0700 @@ -317,7 +317,7 @@ formats = self.formats() if formats and dump: parser.add_option(dump, dest='dump', - help="dump configuration to a file [Formats: %s]" % formats) + help="dump configuration to a file; Formats: %s" % formats) return parser @@ -348,11 +348,16 @@ if not os.path.exists(i)] if missing: parser.error("Missing files: %s" % ', '.join(missing)) + config = [] for f in configuration_files: - pass + try: + config.append(self.deserialize(f)) + except BaseException, e: + parser.error(str(e)) + config.append(cli_config) # generate configuration - self(cli_config) + self(*config) # dump configuration, if specified dump = getattr(options, 'dump')