Commit 278b4a32 authored by Nicolas Delaby's avatar Nicolas Delaby

lxml is an hard dependency, so remove defensing code to workaround ImportError

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35336 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 50d60642
......@@ -9,14 +9,11 @@ from zope.interface import implements
from OFS.Image import Image as OFSImage
from zLOG import LOG
try:
from Products.ERP5OOo.OOoUtils import OOoBuilder
import re
from lxml import etree
from lxml.etree import ParseError, Element
import_succeed = 1
except ImportError:
import_succeed = 0
from Products.ERP5OOo.OOoUtils import OOoBuilder
import re
from lxml import etree
from lxml.etree import ParseError, Element
from urllib import unquote
from urlparse import urlparse
try:
......@@ -69,7 +66,7 @@ class OOOdCommandTransform(commandtransform):
self.__name__ = name
self.mimetype = mimetype
self.context = context
if import_succeed and self.mimetype == 'text/html':
if self.mimetype == 'text/html':
data = self.includeExternalCssList(data)
self.data = data
......@@ -199,7 +196,7 @@ class OOOdCommandTransform(commandtransform):
def convertTo(self, format):
if self.ooo.isTargetFormatAllowed(format):
mime, data = self.ooo.convert(format)
if import_succeed and self.mimetype == 'text/html':
if self.mimetype == 'text/html':
data = self.includeImageList(data)
return data
else:
......
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