changeset 20:8587528177b4

begin to separate out path handling
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 06 Dec 2012 16:47:52 -0800
parents 2d6b1a8a2b7d
children 0cac33b7682a
files mozillatry.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)