Skip to content

Commit f004273

Browse files
authored
fixed redirection for download liblzma (#2452)
* fixed redirection for download liblzma * use wget
1 parent 79f9030 commit f004273

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pythonforandroid/recipe.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,8 @@ def report_hook(index, blksize, size):
213213
while True:
214214
try:
215215
# jqueryui.com returns a 403 w/ the default user agent
216-
url_opener.addheaders = [('User-agent', 'Mozilla/5.0')]
216+
# Mozilla/5.0 doesnt handle redirection for liblzma
217+
url_opener.addheaders = [('User-agent', 'Wget/1.0')]
217218
urlretrieve(url, target, report_hook)
218219
except OSError as e:
219220
attempts += 1

0 commit comments

Comments
 (0)