Skip to content

Commit

Permalink
Explicit private visibility of curl_connection_error_codes.
Browse files Browse the repository at this point in the history
  • Loading branch information
theypsilon committed May 7, 2023
1 parent f1fd1d8 commit 0c53e0e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/update_all/os_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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",
Expand Down

0 comments on commit 0c53e0e

Please sign in to comment.