commit | 6754d52521f597caf3adae1b59d8d8bfbc18fbce | [log] [tgz] |
---|---|---|
author | Barry Warsaw <barry@python.org> | Tue Jun 10 16:31:55 2003 +0000 |
committer | Barry Warsaw <barry@python.org> | Tue Jun 10 16:31:55 2003 +0000 |
tree | bb57de2f30b153478892190cd2928640fdd45b72 | |
parent | 9caa0d1642b79020a1665560e6efaedabfadfba3 [diff] [blame] |
get_payload(): Improve the TypeError message when the payload isn't of the expected type. In response to SF #751451.
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 @@ 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: