# HG changeset patch # User Jeff Hammel # Date 1354841272 28800 # Node ID 8587528177b43710aa730c15f101d56a3343fd10 # Parent 2d6b1a8a2b7df504447ab87f2cfebe433ce98078 begin to separate out path handling diff -r 2d6b1a8a2b7d -r 8587528177b4 mozillatry.py --- a/mozillatry.py Thu Dec 06 16:19:07 2012 -0800 +++ b/mozillatry.py Thu Dec 06 16:47:52 2012 -0800 @@ -93,6 +93,9 @@ 'flags': ["--m-c", "--mozilla-central"]} } + # configuration items to interpolate as paths + paths = ['mozilla_central'] + def __init__(self): configuration.Configuration.__init__(self, usage=self.usage, load='--config') @@ -104,7 +107,9 @@ if (not self.config.get('opt')) and (not self.config.get('debug')): raise ConfigurationError("Must have opt or debug builds") - self.config['mozilla_central'] = os.path.expanduser(self.config['mozilla_central']) + for path in self.paths: + self.config[path] = os.path.expanduser(self.config[path]) + try_directory = self.config.get('mozilla_central') if (try_directory is None) or (not os.path.exists(try_directory)): raise ConfigurationError("mozilla-central directory does not exist: %s" % try_directory)