8000 gh-134759: `UnboundLocalError` in `email.message.Message.get_payload` by skv0zsneg · Pull Request #136071 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-134759: UnboundLocalError in email.message.Message.get_payload #136071

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

Merged
merged 13 commits into from
Jul 12, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Change elif statement to if
  • Loading branch information
skv0zsneg committed Jun 28, 2025
commit e156408819d0ad3efe0e86409da8cb210ce37d63
2 changes: 1 addition & 1 deletion Lib/email/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def get_payload(self, i=None, decode=False):
# If it does happen, turn the string into bytes in a way
# guaranteed not to fail.
bpayload = payload.encode('raw-unicode-escape')
elif isinstance(payload, bytes):
else:
bpayload = payload
if cte == 'quoted-printable':
return quopri.decodestring(bpayload)
Expand Down
0