Skip to content

fix: Decoding non-unicode characters raises unhandled exception - #554

Merged
mildaniel merged 5 commits into
aws:developfrom
mildaniel:fix-utf8-decoding
Oct 10, 2023
Merged

mildaniel merged 5 commits into
aws:developfrom
mildaniel:fix-utf8-decoding

Conversation

@mildaniel

Copy link
Copy Markdown
Contributor

Issue #, if available:
#548
aws/aws-sam-cli#2317

Description of changes:
There are times when Lambda Builders will attempt to decode command output that contains unsupported characters. In these events, the program will crash with an unhandled exception. Instead, complete the build and log a message explaining that the output couldn't be decoded.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

import locale
import logging

from ...utils import decode

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: absolute imports.

@sriram-mv

Copy link
Copy Markdown
Contributor

LGTM, though there are windows failures that need to be addressed.

@mildaniel
mildaniel added this pull request to the merge queue Oct 10, 2023
Merged via the queue into aws:develop with commit 2dcdd2a Oct 10, 2023
@mildaniel
mildaniel deleted the fix-utf8-decoding branch October 10, 2023 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants