changeset 4486:12883f0d9543

Another download fallback fix.
author Jan Nieuwenhuizen <janneke@gnu.org>
date Fri, 24 Oct 2008 16:47:39 +0200
parents efe5e736d7ae
children dc092ee1c99f
files gub/misc.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/gub/misc.py	Fri Oct 24 16:42:54 2008 +0200
+++ b/gub/misc.py	Fri Oct 24 16:47:39 2008 +0200
@@ -206,14 +206,15 @@
                   fallback=['http://lilypond.org/download/gub-sources'],
                   progress=sys.stderr.write):
 
-    assert type(local) == list
-    assert type(fallback) == list
+    assert type (local) == list
+    assert type (fallback) == list
 
     candidate_urls = []
     for url in local + [original_url] + fallback:
-        candidate_urls.append(url)
+        if url and not url.endswith ('gub-sources'):
+            candidate_urls.append (url)
         if not is_ball (os.path.basename (url)):
-            candidate_urls.append(rewrite_url (original_url, url))
+            candidate_urls.append (rewrite_url (original_url, url))
 
     for url in candidate_urls:
         size = _download_url (url, dest_dir, progress)