Commit fc48aa22 authored by Jérome Perrin's avatar Jérome Perrin

don't hide 'type' builtin

use 'is' to compare with None


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29971 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 640654ed
......@@ -146,9 +146,9 @@ def buildEmailMessage(from_url, to_url, msg=None,
# try to guess the mime type
if not attachment.has_key('mime_type'):
type, encoding = guess_type( attachment_name )
if type != None:
attachment['mime_type'] = type
mime_type, encoding = guess_type( attachment_name )
if mime_type is not None:
attachment['mime_type'] = mime_type
else:
attachment['mime_type'] = 'application/octet-stream'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment