Mercurial > mozilla > hg > MozillaTry
comparison mozillatry.py @ 13:1e90d869f787
only use the configuration values we need
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 04 Dec 2012 16:25:31 -0800 |
parents | c0e50e040275 |
children | 06b8783eae81 |
comparison
equal
deleted
inserted
replaced
12:c0e50e040275 | 13:1e90d869f787 |
---|---|
110 default_config = os.path.expanduser(self.default_config_file) | 110 default_config = os.path.expanduser(self.default_config_file) |
111 if os.path.exists(default_config): | 111 if os.path.exists(default_config): |
112 configuration_files = [default_config] | 112 configuration_files = [default_config] |
113 return configuration_files | 113 return configuration_files |
114 | 114 |
115 def load_configuration_file(self, filename): | |
116 config = configuration.Configuration.load_configuration_file(self, filename) | |
117 | |
118 # ignore options that we don't care about | |
119 config = dict([(key, value) for key, value in config.items() | |
120 if key in self.option_dict]) | |
121 return config | |
122 | |
115 def main(args=sys.argv[1:]): | 123 def main(args=sys.argv[1:]): |
116 | 124 |
117 # parse command line arguments | 125 # parse command line arguments |
118 parser = MozillaTryConfiguration() | 126 parser = MozillaTryConfiguration() |
119 options, args = parser.parse_args() | 127 options, args = parser.parse_args() |