Skip to content
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

declare artifact_content variable to avoid reference before assignmen… #1554

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

sa3eed3ed
Copy link
Contributor

…t in case of exception

in case the content is not UTF-8 encoded an exception will be raised and artifact_content will never be assigned, this cause the task to fail with a misleading exception: [local variable 'artifact_content' referenced before assignment], while it should be Artifact {evidence.artifact_name} has empty content or not UTF-8 encoded

Description of the change

Applicable issues

  • fixes #

Additional information

Checklist

  • All tests were successful.
  • Unit tests added.
  • Documentation updated.

…t in case of exception

in case the content is not UTF-8 encoded an exception will be raised and artifact_content will never be assigned, this cause the task to fail with a misleading exception: `[local variable 'artifact_content' referenced before assignment]`, while it should be `Artifact {evidence.artifact_name} has empty content or not UTF-8 encoded`
Copy link
Member

@aarontp aarontp left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@aarontp aarontp merged commit 338f28b into google:master Sep 26, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants