Commit 0ab1bb48 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

It seems that sometimes required versions are specified without

parentheses... Which is the right format? For now, support both.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17291 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a2d5aa06
...@@ -688,8 +688,10 @@ class TemplateTool (BaseTool): ...@@ -688,8 +688,10 @@ class TemplateTool (BaseTool):
dependency = dependency_couple_list[0] dependency = dependency_couple_list[0]
version_restriction = None version_restriction = None
if len(dependency_couple_list) > 1: if len(dependency_couple_list) > 1:
# remove parenthesis to get something like ">= O.2" version_restriction = dependency_couple_list[1]
version_restriction = dependency_couple_list[1][1:-1] if version_restriction.startswith('('):
# Something like "(>= 1.0rc6)".
version_restriction = version_restriction[1:-1]
require_update = False require_update = False
installed_bt = self.portal_templates.getInstalledBusinessTemplate(dependency) installed_bt = self.portal_templates.getInstalledBusinessTemplate(dependency)
if version_restriction is not None: if version_restriction is not None:
......
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