[jhbuild/jjardon/gnome-modulesets: 4/6] moduleset.py: raise an error if the moduleset variable is not an URI
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild/jjardon/gnome-modulesets: 4/6] moduleset.py: raise an error if the moduleset variable is not an URI
- Date: Tue, 21 Apr 2015 16:54:12 +0000 (UTC)
commit 19e952cbe928062d7e295aa3265385563b4a2a88
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 dce577a..12a8557 100644
--- a/jhbuild/moduleset.py
+++ b/jhbuild/moduleset.py
@@ -361,17 +361,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)
return ms
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]