[jhbuild] Do not access parsed URI part by attribute name (GNOME bug 637218)



commit 33fb1f165b73089e18dcf68505ef43e022403b08
Author: Frédéric Péters <fpeters 0d be>
Date:   Tue Dec 14 11:23:23 2010 +0100

    Do not access parsed URI part by attribute name (GNOME bug 637218)
    
    urlparse() did return a simple tuple in Python < 2.5, use index instead of
    attribute name to access to the URI scheme, to keep working with older Python
    versions.

 jhbuild/moduleset.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/jhbuild/moduleset.py b/jhbuild/moduleset.py
index 572f62f..b2bfc6c 100644
--- a/jhbuild/moduleset.py
+++ b/jhbuild/moduleset.py
@@ -293,7 +293,7 @@ def load(config, uri=None):
                 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).scheme:
+        elif not urlparse.urlparse(uri)[0]:
             uri = 'http://git.gnome.org/browse/jhbuild/plain/modulesets' \
                   '/%s.modules' % uri
         try:



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