Commit e004cec6 authored by Julien Muchembled's avatar Julien Muchembled

TemplateTool: do not fail if filter is missing

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40072 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 34b1bfc7
......@@ -56,7 +56,7 @@ import cPickle
import posixpath
from base64 import b64encode, b64decode
from Products.ERP5Type.Message import translateString
from zLOG import LOG, INFO
from zLOG import LOG, INFO, WARNING
from base64 import decodestring
import subprocess
......@@ -637,9 +637,14 @@ class TemplateTool (BaseTool):
# inconsistent, the called method should not return None when
# nothing is selected
portal = self.getPortalObject()
script_id_list = portal.portal_preferences\
.getPreferredDiffFilterScriptIdList() or ()
return [getattr(portal, x) for x in script_id_list]
script_list = []
for script_id in portal.portal_preferences\
.getPreferredDiffFilterScriptIdList() or ():
try:
script_list.append(getattr(portal, script_id))
except AttributeError:
LOG("TemplateTool", WARNING, "Unable to find %r script" % script_id)
return script_list
def getFilteredDiffAsHTML(self, diff):
"""
......
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