Skip to content

Commit

Permalink
Tests: update Solr download script for recent API change
Browse files Browse the repository at this point in the history
  • Loading branch information
acdha committed Sep 24, 2015
1 parent a1de02b commit 4657e73
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion get-solr-download-url.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# encoding: utf-8

from __future__ import absolute_import, print_function, unicode_literals
from __future__ import absolute_import, division, print_function, unicode_literals

import sys

Expand All @@ -28,5 +28,8 @@
if mirror_response.ok:
mirror_data = mirror_response.json()
download_url = urljoin(mirror_data['preferred'], mirror_data['path_info'])
# The Apache mirror script's response format has recently changed to exclude the actual file paths:
if not download_url.endswith(tarball):
download_url = urljoin(download_url, dist_path)

print(download_url)

0 comments on commit 4657e73

Please sign in to comment.