[jhbuild] Also set moduleset_name if URI does not end in '.modules'



commit 849879cfb27b7409e14ae171faaab55ee07b06bb
Author: Dirk Wallenstein <halsmit t-online de>
Date:   Sun Apr 10 16:37:08 2011 +0200

    Also set moduleset_name if URI does not end in '.modules'
    
    Just in case there are modulesets without '.modules' suffix.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=647433

 jhbuild/moduleset.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/jhbuild/moduleset.py b/jhbuild/moduleset.py
index a82e34e..aacd4a9 100644
--- a/jhbuild/moduleset.py
+++ b/jhbuild/moduleset.py
@@ -352,8 +352,10 @@ def _parse_module_set(config, uri):
     assert document.documentElement.nodeName == 'moduleset'
     moduleset = ModuleSet(config = config)
     moduleset_name = document.documentElement.getAttribute('name')
-    if not moduleset_name and uri.endswith('.modules'):
-        moduleset_name = os.path.basename(uri)[:-len('.modules')]    
+    if not moduleset_name:
+        moduleset_name = os.path.basename(uri)
+        if moduleset_name.endswith('.modules'):
+            moduleset_name = moduleset_name[:-len('.modules')]
 
     # load up list of repositories
     repositories = {}



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