def _fetchFromURLDict(self, distname, url, arch, distro_info, check_xen): logging.debug("\nDistro='%s' arch='%s' url=%s", distname, arch, url) fetcher = urlfetcher._fetcherForURI(url, "/tmp") try: fetcher.prepareLocation() except Exception, e: # Don't raise an error here: the site might be down atm logging.error("%s-%s: Couldn't access url %s: %s. Skipping.", distname, arch, fetcher.location, str(e)) fetcher.cleanupLocation() return
def _fetchLocalMedia(self, mediapath): arch = platform.machine() fetcher = urlfetcher._fetcherForURI(mediapath, "/tmp") try: fetcher.prepareLocation() # Make sure we detect _a_ distro hvmstore = self._getStore(fetcher, mediapath, "hvm", arch) logging.debug("Local distro detected as: %s", hvmstore) finally: fetcher.cleanupLocation()