# HG changeset patch # User Jeff Hammel # Date 1354664154 28800 # Node ID 9b90cf893943136b6e9868ef8d9a7130abe112cc # Parent f0bca08e296a6851df5b14f48e8ef951861d8d90 default configuration file diff -r f0bca08e296a -r 9b90cf893943 mozillatry.py --- a/mozillatry.py Tue Dec 04 15:28:31 2012 -0800 +++ b/mozillatry.py Tue Dec 04 15:35:54 2012 -0800 @@ -104,27 +104,13 @@ if (not self.config.get('opt')) and (not self.config.get('debug')): raise ConfigurationError("Must have opt or debug builds") - -def read_config(filename, options): - """read .mozutils config file and substitute for options if None""" - - # XXX stub; this should really use - # e.g. http://k0s.org/mozilla/hg/configuration/ - from ConfigParser import ConfigParser - parser = ConfigParser() - if not os.path.exists(filename): - return parser - parser.read(filename) - if options.mozilla_central is None: - try: - path = parser.get('hg', 'mozilla-central') - if path: - options.mozilla_central = os.path.expanduser(path) - except Exception: # XXX temporary hack - pass - return parser - - + def configuration_files(self, options, args): + configuration_files = configuration.Configuration(self, options, args) + if not configuration_files: + default_config = os.path.expanduser(default_config_file) + if os.path.exists(default_config): + configuration_files = [default_config] + return configuration_files def main(args=sys.argv[1:]):