handle empty message params correctly
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3700 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
63e61d5088
commit
137c2f88f9
1 changed files with 4 additions and 1 deletions
|
@ -129,4 +129,7 @@ def getText(msg):
|
|||
return msg.get_payload(decode=True).decode(getCharset(msg))
|
||||
|
||||
def getCharset(msg):
|
||||
return dict(msg.get_params()).get('charset') or 'ISO8859-1'
|
||||
params = msg.get_params()
|
||||
if params:
|
||||
return dict(params).get('charset') or 'ISO8859-1'
|
||||
return 'ISO8859-1'
|
||||
|
|
Loading…
Add table
Reference in a new issue