diff --git a/python/lib/dependabot/python/file_updater/pip_compile_file_updater.rb b/python/lib/dependabot/python/file_updater/pip_compile_file_updater.rb index 27708dc948a..267b695bf87 100644 --- a/python/lib/dependabot/python/file_updater/pip_compile_file_updater.rb +++ b/python/lib/dependabot/python/file_updater/pip_compile_file_updater.rb @@ -220,7 +220,7 @@ def write_updated_dependency_files end def install_required_python - return if run_command("pyenv versions").include?("#{python_version}\n") + return if run_command("pyenv versions").include?("\ #{python_version}") run_command("pyenv install -s #{python_version}") run_command("pyenv exec pip install --upgrade pip") diff --git a/python/lib/dependabot/python/metadata_finder.rb b/python/lib/dependabot/python/metadata_finder.rb index 09e7fca0120..c136a0b31ba 100644 --- a/python/lib/dependabot/python/metadata_finder.rb +++ b/python/lib/dependabot/python/metadata_finder.rb @@ -131,6 +131,8 @@ def pypi_listing return @pypi_listing rescue JSON::ParserError next + rescue Excon::Error::Timeout + next end @pypi_listing = {} # No listing found diff --git a/python/lib/dependabot/python/update_checker.rb b/python/lib/dependabot/python/update_checker.rb index ef673477d86..55a0747ba05 100644 --- a/python/lib/dependabot/python/update_checker.rb +++ b/python/lib/dependabot/python/update_checker.rb @@ -277,6 +277,8 @@ def poetry_library? pypi_info = JSON.parse(index_response.body)["info"] || {} pypi_info["summary"] == details["description"] + rescue Excon::Error::Timeout + false rescue URI::InvalidURIError false end diff --git a/python/lib/dependabot/python/update_checker/pip_compile_version_resolver.rb b/python/lib/dependabot/python/update_checker/pip_compile_version_resolver.rb index c654082b324..d0b32fdc387 100644 --- a/python/lib/dependabot/python/update_checker/pip_compile_version_resolver.rb +++ b/python/lib/dependabot/python/update_checker/pip_compile_version_resolver.rb @@ -314,7 +314,7 @@ def write_original_manifest_files end def install_required_python - return if run_command("pyenv versions").include?("#{python_version}\n") + return if run_command("pyenv versions").include?("\ #{python_version}") run_command("pyenv install -s #{python_version}") run_command("pyenv exec pip install --upgrade pip") diff --git a/python/lib/dependabot/python/update_checker/pipenv_version_resolver.rb b/python/lib/dependabot/python/update_checker/pipenv_version_resolver.rb index ec0532e477f..608ce50ae54 100644 --- a/python/lib/dependabot/python/update_checker/pipenv_version_resolver.rb +++ b/python/lib/dependabot/python/update_checker/pipenv_version_resolver.rb @@ -323,7 +323,7 @@ def install_required_python nil end - return if run_command("pyenv versions").include?("#{python_version}\n") + return if run_command("pyenv versions").include?("\ #{python_version}") requirements_path = NativeHelpers.python_requirements_path run_command("pyenv install -s #{python_version}")