diff options
author | Barry Warsaw <barry@python.org> | 2003-06-10 16:31:55 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2003-06-10 16:31:55 (GMT) |
commit | 6754d52521f597caf3adae1b59d8d8bfbc18fbce (patch) | |
tree | bb57de2f30b153478892190cd2928640fdd45b72 /Lib/email/Message.py | |
parent | 9caa0d1642b79020a1665560e6efaedabfadfba3 (diff) | |
download | cpython-6754d52521f597caf3adae1b59d8d8bfbc18fbce.zip cpython-6754d52521f597caf3adae1b59d8d8bfbc18fbce.tar.gz cpython-6754d52521f597caf3adae1b59d8d8bfbc18fbce.tar.bz2 |
get_payload(): Improve the TypeError message when the payload isn't of
the expected type. In response to SF #751451.
Diffstat (limited to 'Lib/email/Message.py')
-rw-r--r-- | Lib/email/Message.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/email/Message.py b/Lib/email/Message.py index 0f513f5..6dfa84b 100644 --- a/Lib/email/Message.py +++ b/Lib/email/Message.py @@ -186,7 +186,7 @@ class Message: if i is None: payload = self._payload elif not isinstance(self._payload, ListType): - raise TypeError, i + raise TypeError, 'Expected list, got %s' % type(self._payload) else: payload = self._payload[i] if decode: |