#40 atomic: fix download url to point to dl.fp.o and not dl.phx2.fp.o
Merged 7 years ago by kevin. Opened 7 years ago by maxamillion.
maxamillion/fedora-websites fix-two-week-atomic  into  master

@@ -51,6 +51,8 @@ 

  else:

      DL_URL_PREFIX = 'https://dl.fedoraproject.org'

  

+ download_fpo = 'https://dl.fedoraproject.org'

+ 

  

  def get_page(page, pages):

      """ Retrieve the JSON for a particular page of datagrepper results """
@@ -154,8 +156,10 @@ 

  

              # Do an HTTP HEAD to find the size of the file in megabytes

              url = entry['image_url']

+             download_url = entry['image_url']

              if not url.startswith('http'):

                  url = DL_URL_PREFIX + url

+                 download_url = download_fpo + entry['image_url']

              response = requests.head(url)

              if not bool(response):

                  log.error("Failed to HEAD %s for size.  %r" % (url, response))
@@ -165,7 +169,7 @@ 

  

              # Provide the download URL

              url_key = mapping[key] + "_url"

-             results['release'][url_key] = url

+             results['release'][url_key] = download_url

  

              # Figure out which of our vars we're going to set, and set it

              iso_size_key = iso_size_prefix + mapping[key]

Sure, seems fine until we can sort out mirrormanager.

Pull-Request has been merged by kevin

7 years ago
Metadata