Skip to content

Commit

Permalink
Handling curl ssl a bit better.
Browse files Browse the repository at this point in the history
  • Loading branch information
theypsilon committed May 7, 2023
1 parent 7999a28 commit 47688aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/update_all/config_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def fill_config_with_environment_and_mister_section(self, config: Config):
if is_debug_enabled(self._env):
config.verbose = True

config.curl_ssl = valid_max_length(KENV_CURL_SSL, self._env[KENV_CURL_SSL], 50)
config.commit = valid_max_length(KENV_COMMIT, self._env[KENV_COMMIT], 50)
config.curl_ssl = valid_max_length(KENV_CURL_SSL, self._env[KENV_CURL_SSL], 50).strip()
config.commit = valid_max_length(KENV_COMMIT, self._env[KENV_COMMIT], 50).strip()
config.start_time = time.time()
config.key_ignore_time = float(self._env[KENV_KEY_IGNORE_TIME])

Expand Down
4 changes: 3 additions & 1 deletion src/update_all/os_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ def sleep(self, seconds) -> None:

def download(self, url) -> Optional[bytes]:
curl_ssl = self._config_provider.get().curl_ssl
curl_command = ["curl", *curl_ssl.split(), "-s", "-L"]
curl_command = ["curl", "-s", "-L"]
if curl_ssl != "":
curl_command.extend(curl_ssl.split())
if '--retry' not in curl_ssl:
curl_command.extend(["--retry", "3"])
if '--connect-timeout' not in curl_ssl:
Expand Down

0 comments on commit 47688aa

Please sign in to comment.