get_payload(): Improve the TypeError message when the payload isn't of

the expected type.  In response to SF #751451.
This commit is contained in:
Barry Warsaw 2003-06-10 16:31:55 +00:00
parent 9caa0d1642
commit 6754d52521
1 changed files with 1 additions and 1 deletions

View File

@ -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: