[Erp5-report] r29971 - /erp5/trunk/products/ERP5/Tool/NotificationTool.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Oct 23 14:56:06 CEST 2009


Author: jerome
Date: Fri Oct 23 14:56:03 2009
New Revision: 29971

URL: http://svn.erp5.org?rev=29971&view=rev
Log:
don't hide 'type' builtin
use 'is' to compare with None

Modified:
    erp5/trunk/products/ERP5/Tool/NotificationTool.py

Modified: erp5/trunk/products/ERP5/Tool/NotificationTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Tool/NotificationTool.py?rev=29971&r1=29970&r2=29971&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/NotificationTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Tool/NotificationTool.py [utf8] Fri Oct 23 14:56:03 2009
@@ -146,9 +146,9 @@
 
     # 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'
 




More information about the Erp5-report mailing list