All pastes #121230 Raw Edit

Something

public text v1 · immutable
·published 2006-08-07 20:59 UTC
rendered paste body
diff -r eec684c1db4c conary/build/lookaside.py
--- a/conary/build/lookaside.py Mon Aug 07 16:04:21 2006 -0400
+++ b/conary/build/lookaside.py Tue Aug 08 00:58:10 2006 +0400
@@ -136,7 +136,6 @@ def fetchURL(cfg, name, location, httpHe
 
     retries = 0
     url = None
-    mirror = mirror or name
 
     # check for negative cache entries to avoid spamming servers
     negativeName = _createNegativeCacheName(cfg, name, location)
@@ -155,7 +154,7 @@ def fetchURL(cfg, name, location, httpHe
             url = urllib2.urlopen(req)
             if not name.startswith('ftp://'):
                 content_type = url.info()['content-type']
-                if guessName and 'text/html' in content_type:
+                if (guessName or mirror) and 'text/html' in content_type:
                     raise urllib2.URLError('"%s" not found' % name)
             log.info('Downloading %s...', name)
             break
@@ -201,6 +200,7 @@ def fetchURL(cfg, name, location, httpHe
     if url is None:
         return None
 
+    mirror = mirror or name
     rc = _createCacheEntry(cfg, mirror, location, url)
     return rc