[jhbuild/jjardon/gnome-modulesets: 4/6] moduleset.py: raise an error if the moduleset variable is not an URI



commit d1cb2efd6e9b8fbb94c8871bd15d0c28fa3c200c
Author: Javier Jardón <jjardon gnome org>
Date:   Sun Mar 22 22:49:03 2015 +0000

    moduleset.py: raise an error if the moduleset variable is not an URI

 jhbuild/moduleset.py |   13 ++-----------
 1 files changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/jhbuild/moduleset.py b/jhbuild/moduleset.py
index 36929ac..6461fe4 100644
--- a/jhbuild/moduleset.py
+++ b/jhbuild/moduleset.py
@@ -362,17 +362,8 @@ def load(config, uri=None):
         modulesets = [ config.moduleset ]
     ms = ModuleSet(config = config)
     for uri in modulesets:
-        if os.path.isabs(uri):
-            pass
-        elif config.modulesets_dir and config.nonetwork or config.use_local_modulesets:
-            if os.path.isfile(os.path.join(config.modulesets_dir,
-                                           uri + '.modules')):
-                uri = os.path.join(config.modulesets_dir, uri + '.modules')
-            elif os.path.isfile(os.path.join(config.modulesets_dir, uri)):
-                uri = os.path.join(config.modulesets_dir, uri)
-        elif not urlparse.urlparse(uri)[0]:
-            uri = 'https://git.gnome.org/browse/gnome-modulesets/plain' \
-                  '/%s.modules' % uri
+        if not urlparse.urlparse(uri):
+           raise FatalError(_("moduleset variable '%s' should be a URI") % uri)
         ms.modules.update(_parse_module_set(config, uri).modules)
 
     # create virtual sysdeps


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]