Commit f8b8874d authored by Romain Courteaud's avatar Romain Courteaud

Remove useless except without exception.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7308 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1008a611
...@@ -83,17 +83,18 @@ def MailInTool_postUTF8MailMessage(self, file=None): ...@@ -83,17 +83,18 @@ def MailInTool_postUTF8MailMessage(self, file=None):
# Keep the content type # Keep the content type
theMail['attachment_list'].append((file_name, content_type, theMail['attachment_list'].append((file_name, content_type,
payload)) payload))
try: portal_url = self.portal_url.getPortalPath()
portal_url = self.portal_url.getPortalPath() if (portal_url != '') and (portal_url[-1] != '/'):
if portal_url[-1]!='/': portal_url=portal_url+'/' portal_url = portal_url+'/'
except:
portal_url = ''
if self.method: if self.method:
try: try:
return self.restrictedTraverse(portal_url+self.method)\ return self.restrictedTraverse(portal_url+self.method)\
(theMail=theMail) (theMail=theMail)
except: except:
# It's needed to catch all exceptions, as we need to return
# a value to the MTA in this case.
# Generate log message # Generate log message
fp = StringIO.StringIO() fp = StringIO.StringIO()
traceback.print_exc(file=fp) traceback.print_exc(file=fp)
......
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