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



commit 3a2b2177d10dae89efcbcec0c47a00015834c075
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]