From a203b7569bc5ac96b17e9ee9af58590cceaf332f Mon Sep 17 00:00:00 2001 From: Jiri Konecny Date: Mon, 12 Aug 2024 14:33:52 +0200 Subject: [PATCH] Use proxy server also for FTP .treeinfo download We missed ftp prefix in the list of schemes. Resolves: RHEL-27938 --- pyanaconda/modules/payloads/payload/dnf/tree_info.py | 3 ++- .../modules/payloads/payload/test_dnf_tree_info.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pyanaconda/modules/payloads/payload/dnf/tree_info.py b/pyanaconda/modules/payloads/payload/dnf/tree_info.py index eb4c71913c1..5430db5a7ef 100644 --- a/pyanaconda/modules/payloads/payload/dnf/tree_info.py +++ b/pyanaconda/modules/payloads/payload/dnf/tree_info.py @@ -274,7 +274,8 @@ def _get_downloader(self, session, data): proxy = ProxyString(proxy_url) proxies = { "http": proxy.url, - "https": proxy.url + "https": proxy.url, + "ftp": proxy.url } except ProxyStringError as e: log.debug("Failed to parse the proxy '%s': %s", proxy_url, e) diff --git a/tests/unit_tests/pyanaconda_tests/modules/payloads/payload/test_dnf_tree_info.py b/tests/unit_tests/pyanaconda_tests/modules/payloads/payload/test_dnf_tree_info.py index 67f25842fc4..b0c7aacbe0f 100644 --- a/tests/unit_tests/pyanaconda_tests/modules/payloads/payload/test_dnf_tree_info.py +++ b/tests/unit_tests/pyanaconda_tests/modules/payloads/payload/test_dnf_tree_info.py @@ -419,7 +419,8 @@ def test_load_data_proxy(self, session_getter): headers={"user-agent": "anaconda (anaconda)/bluesky"}, proxies={ 'http': 'http://user:pass@example.com:3128', - 'https': 'http://user:pass@example.com:3128' + 'https': 'http://user:pass@example.com:3128', + 'ftp': 'http://user:pass@example.com:3128' }, verify=True, cert=None,