-
Notifications
You must be signed in to change notification settings - Fork 819
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
fix(cmd/main.py): use correct return value #4939
Conversation
I'm not sure how to add a test for this. Any inputs on the same would be helpful. Thanks. |
cloudinit/cmd/main.py
Outdated
v1[mode]["errors"] = [str(e) for e in errors] | ||
v1[mode]["errors"] = [] | ||
for e in errors: | ||
v1[mode]["errors"].append(str(e)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of this change? The new code is functionally identical to the code it replaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
errors
can be an integer value here, not always a list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed there was in issue in the code change, fixed it. Thanks.
Also, could you please modify your proposed commit message section so that your commit message appears as a code block like the following:
And could you move the
information in the PR description to the Thanks! |
@sshedi Do you use this for something? This doesn't normally run during boot, so I'm curious what you use it for. |
In one of our CI/CD pipelines, I tried adding:
And caught this issue. Nothing major, but I think the return value should be appropriate. |
Thanks for the input and suggestions. Previously while raising PRs, this section was simple. I feel it's a bit complex now. I will try. |
f5e8011
to
f43b448
Compare
Signed-off-by: Shreenidhi Shedi <shreenidhi.shedi@broadcom.com>
Proposed Commit Message
Additional Context
Test Steps
Checklist
Merge type