fix super-mirror issue

This commit is contained in:
David Rose 2009-12-02 15:31:52 +00:00
parent 8d3b22e3cc
commit 8bcb52efdd

View File

@ -349,6 +349,15 @@ class AppRunner(DirectObject):
assert self.http
# It's stale, get a new one.
doc = None
if self.superMirrorUrl:
# Use the "super mirror" first.
url = PandaModules.URLSpec(self.superMirrorUrl + fileSpec.filename)
print "Freshening %s" % (url)
doc = self.http.getDocument(url)
if not doc or not doc.isValid():
# Failing the super mirror, contact the actual host.
url = PandaModules.URLSpec(host.hostUrlPrefix + fileSpec.filename)
print "Freshening %s" % (url)
doc = self.http.getDocument(url)