Commit 010c2eca authored by Nicolas Delaby's avatar Nicolas Delaby

Improve backward compatibility with previous

implemenation

Done by JPS


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41711 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ab4f2b54
...@@ -317,8 +317,12 @@ class ContributionTool(BaseTool): ...@@ -317,8 +317,12 @@ class ContributionTool(BaseTool):
if filename is None: if filename is None:
return {} return {}
property_dict = self.getMatchedFilenamePatternDict(filename) property_dict = self.getMatchedFilenamePatternDict(filename)
method = self._getTypeBasedMethod('getPropertyDictFromFilename', try:
method = self._getTypeBasedMethod('getPropertyDictFromFilename',
fallback_script_id='ContributionTool_getPropertyDictFromFilename') fallback_script_id='ContributionTool_getPropertyDictFromFilename')
except AttributeError: # Try to use previous naming convention
method = self._getTypeBasedMethod('getPropertyDictFromFileName',
fallback_script_id='ContributionTool_getPropertyDictFromFileName')
property_dict = method(filename, property_dict) property_dict = method(filename, property_dict)
return property_dict return property_dict
......
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