Skip to content

CFE-4405: Added curl installation check when remote download #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

victormlg
Copy link
Contributor

No description provided.

@victormlg victormlg requested a review from olehermanse April 23, 2025 14:27
Ticket: CFE-4405
Signed-off-by: Victor Moene <[email protected]>
@victormlg victormlg force-pushed the curl_not_installed branch from 06b1b00 to 235622e Compare April 25, 2025 05:16
@@ -515,6 +515,12 @@ def install_host(
return 1

if remote_download:
if data.get("bin") and not data.get("bin").get("curl"):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dict.get() returns None by default if the key is not found, so if you try to run .get() on that, you get AttributeError.

You can give an empty dict as a default value, so the last .get() also works:

Suggested change
if data.get("bin") and not data.get("bin").get("curl"):
if data.get("bin") and not data.get("bin", {}).get("curl"):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants