Mercurial > hg > configuration
comparison configuration/config.py @ 9:b28ec204df23
flush out JSON provider
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sun, 25 Mar 2012 10:24:55 -0700 |
parents | 975fbc45cfcd |
children | c782d750fd6d |
comparison
equal
deleted
inserted
replaced
8:975fbc45cfcd | 9:b28ec204df23 |
---|---|
25 configuration_providers = [] | 25 configuration_providers = [] |
26 if json: | 26 if json: |
27 class JSON(object): | 27 class JSON(object): |
28 extensions = ['json'] | 28 extensions = ['json'] |
29 def read(self, filename): | 29 def read(self, filename): |
30 raise NotImplementedError("TODO") | 30 return json.loads(file(filename).read()) |
31 configuration_providers.append(JSON) | 31 configuration_providers.append(JSON) |
32 | 32 |
33 if yaml: | 33 if yaml: |
34 class YAML(object): | 34 class YAML(object): |
35 extensions = ['yml'] | 35 extensions = ['yml'] |