Commit 80c2db92 authored by Romain Courteaud's avatar Romain Courteaud

Catch ConflictError


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7323 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 613fa24b
...@@ -16,6 +16,7 @@ import mimetypes ...@@ -16,6 +16,7 @@ import mimetypes
import email import email
from email.Header import decode_header from email.Header import decode_header
from email.Utils import parseaddr from email.Utils import parseaddr
from ZODB.POSException import ConflictError
import traceback import traceback
import StringIO import StringIO
...@@ -91,6 +92,10 @@ def MailInTool_postUTF8MailMessage(self, file=None): ...@@ -91,6 +92,10 @@ def MailInTool_postUTF8MailMessage(self, file=None):
try: try:
return self.restrictedTraverse(portal_url+self.method)\ return self.restrictedTraverse(portal_url+self.method)\
(theMail=theMail) (theMail=theMail)
except ConflictError:
# XXX Warning: if exception is raised, the MTA will
# not return the mail to the sender
raise
except: except:
# It's needed to catch all exceptions, as we need to return # It's needed to catch all exceptions, as we need to return
# a value to the MTA in this case. # a value to the MTA in this case.
......
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