Skip to content

Commit

Permalink
Use a better type check in the payload parser.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rotonen committed May 11, 2019
1 parent 528ceaf commit 232910a
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 232910a

Please sign in to comment.