Commit 50d60642 authored by Nicolas Delaby's avatar Nicolas Delaby

Raise ConversionError instead of custom Exception

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35335 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d1af721b
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
from Products.PortalTransforms.libtransforms.commandtransform import commandtransform from Products.PortalTransforms.libtransforms.commandtransform import commandtransform
from Products.PortalTransforms.interfaces import idatastream from Products.PortalTransforms.interfaces import idatastream
from Products.ERP5Type.Document import newTempOOoDocument from Products.ERP5Type.Document import newTempOOoDocument
from Products.ERP5.Document.Document import ConversionError
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
from Acquisition import aq_base from Acquisition import aq_base
from zope.interface import implements from zope.interface import implements
...@@ -26,9 +27,6 @@ except ImportError: ...@@ -26,9 +27,6 @@ except ImportError:
CLEAN_RELATIVE_PATH = re.compile('^../') CLEAN_RELATIVE_PATH = re.compile('^../')
class TransformError(Exception):
pass
class OOoDocumentDataStream: class OOoDocumentDataStream:
"""Handle OOoDocument in Portal Transforms""" """Handle OOoDocument in Portal Transforms"""
implements(idatastream) implements(idatastream)
...@@ -205,4 +203,4 @@ class OOOdCommandTransform(commandtransform): ...@@ -205,4 +203,4 @@ class OOOdCommandTransform(commandtransform):
data = self.includeImageList(data) data = self.includeImageList(data)
return data return data
else: else:
raise TransformError raise ConversionError('Format not allowed %s' % format)
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