[Erp5-report] r7308 - /erp5/trunk/products/ERP5Type/patches/CMFMailIn.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed May 17 12:04:54 CEST 2006


Author: romain
Date: Wed May 17 12:04:48 2006
New Revision: 7308

URL: http://svn.erp5.org?rev=7308&view=rev
Log:
Remove useless except without exception.

Modified:
    erp5/trunk/products/ERP5Type/patches/CMFMailIn.py

Modified: erp5/trunk/products/ERP5Type/patches/CMFMailIn.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/CMFMailIn.py?rev=7308&r1=7307&r2=7308&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/CMFMailIn.py (original)
+++ erp5/trunk/products/ERP5Type/patches/CMFMailIn.py Wed May 17 12:04:48 2006
@@ -83,17 +83,18 @@
       # Keep the content type
       theMail['attachment_list'].append((file_name, content_type, 
                                          payload))
-  try:
-    portal_url = self.portal_url.getPortalPath()
-    if portal_url[-1]!='/': portal_url=portal_url+'/'
-  except:
-    portal_url = ''
+  portal_url = self.portal_url.getPortalPath()
+  if (portal_url != '') and (portal_url[-1] != '/'): 
+    portal_url = portal_url+'/'
       
   if self.method:
     try:
       return self.restrictedTraverse(portal_url+self.method)\
                                                     (theMail=theMail)
     except:
+      # It's needed to catch all exceptions, as we need to return
+      # a value to the MTA in this case.
+
       # Generate log message
       fp = StringIO.StringIO()
       traceback.print_exc(file=fp)




More information about the Erp5-report mailing list