Skip to content

Commit

Permalink
Merge pull request #8 from plone/roto-fix-py3-payload-parsing
Browse files Browse the repository at this point in the history
Improved payload parsing for Py2 / Py3
  • Loading branch information
pbauer authored May 13, 2019
2 parents 528ceaf + 232910a commit d91e29c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions news/7.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Use a better type check in the payload parser.
[Rotonen]
2 changes: 1 addition & 1 deletion plone/rfc822/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def initializeObject(context, fields, message, defaultCharset="utf-8"):
return

# A single payload is a string, multiparts are lists
if isinstance(payloads, str):
if isinstance(payloads, six.string_types):
if len(primary) != 1:
raise ValueError(
"Got a single string payload for message, but no primary "
Expand Down

0 comments on commit d91e29c

Please sign in to comment.