From 0c53e0ec4d3d44b81c767ad6309694691e443a54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Barroso=20Galindo?= Date: Mon, 8 May 2023 00:03:11 +0100 Subject: [PATCH] Explicit private visibility of curl_connection_error_codes. --- src/update_all/os_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/update_all/os_utils.py b/src/update_all/os_utils.py index 578c5b3..33f1a94 100644 --- a/src/update_all/os_utils.py +++ b/src/update_all/os_utils.py @@ -73,8 +73,8 @@ def download(self, url) -> Optional[bytes]: return subprocess.check_output(self._curl_command(url)) except subprocess.CalledProcessError as e: self._logger.debug(e) - if e.returncode in curl_connection_error_codes: - self._logger.print(f"Connection error: {curl_connection_error_codes[e.returncode]}") + if e.returncode in _curl_connection_error_codes: + self._logger.print(f"Connection error: {_curl_connection_error_codes[e.returncode]}") else: self._logger.print(f"An error occurred, please try again later.") return None @@ -94,7 +94,7 @@ def _curl_command(self, url): return curl_command -curl_connection_error_codes = { +_curl_connection_error_codes = { 5: "Couldn't resolve proxy", 6: "Couldn't resolve host", 7: "Failed to connect to host",