From fc48aa2282c60216524646a70ffe26edb74e4a7d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Fri, 23 Oct 2009 12:56:03 +0000
Subject: [PATCH] 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
---
 product/ERP5/Tool/NotificationTool.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/product/ERP5/Tool/NotificationTool.py b/product/ERP5/Tool/NotificationTool.py
index 5756bdaae9..d53764f2af 100644
--- a/product/ERP5/Tool/NotificationTool.py
+++ b/product/ERP5/Tool/NotificationTool.py
@@ -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'
 
-- 
2.30.9