config: don't add optional config dirs twice
authorTimo Savola <tsavola@movial.fi>
Thu, 19 Jun 2008 09:51:53 +0000 (12:51 +0300)
committerTimo Savola <tsavola@movial.fi>
Thu, 19 Jun 2008 09:51:53 +0000 (12:51 +0300)
matrix/config.py

index d825ff6..9c8bb7a 100644 (file)
@@ -46,7 +46,8 @@ def config_dir(path=None, url=None, branch='master', optional=False):
                if not isdir(path):
                        raise Error('Config dir does not exist: %s' % path)
 
-       config.config_dirs.append(path)
+       if path not in config.initial_config_dirs:
+               config.config_dirs.append(path)
 
 def root(url, branch='master'):
        config.roots.append((url, branch))