From 784fbff0e04c6beacf16b151fb8aec37dfa80424 Mon Sep 17 00:00:00 2001 From: Tom Rothamel Date: Fri, 8 Mar 2024 20:37:02 -0500 Subject: [PATCH] Use the proxies in the updater. --- renpy/update/download.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/renpy/update/download.py b/renpy/update/download.py index 16168b38e7..e01f8c8c0b 100644 --- a/renpy/update/download.py +++ b/renpy/update/download.py @@ -22,6 +22,8 @@ from __future__ import division, absolute_import, with_statement, print_function, unicode_literals from renpy.compat import PY2, basestring, bchr, bord, chr, open, pystr, range, round, str, tobytes, unicode # * +import renpy + import requests import re import os @@ -131,7 +133,7 @@ def download_ranges(url, ranges, destination, progress_callback=None): "Accept-Encoding": "identity", } - r = requests.get(url, headers=headers, stream=True, timeout=10) + r = requests.get(url, headers=headers, stream=True, timeout=10, proxies=renpy.exports.proxies) r.raise_for_status() blocks = [ ] @@ -210,7 +212,7 @@ def download(url, ranges, destination, progress_callback=None): total_size = sum(i[1] for i in ranges) downloaded = 0 - r = requests.get(url, stream=True, headers={"Accept-Encoding": "identity"}, timeout=10) + r = requests.get(url, stream=True, headers={"Accept-Encoding": "identity"}, timeout=10, proxies=renpy.exports.proxies) r.raise_for_status() blocks = [ ]