[
https://issues.apache.org/jira/browse/ARIA-140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15999887#comment-15999887
]
ASF GitHub Bot commented on ARIA-140:
-------------------------------------
Github user AviaE commented on a diff in the pull request:
https://github.com/apache/incubator-ariatosca/pull/100#discussion_r115141706
--- Diff: aria/modeling/service_template.py ---
@@ -2131,13 +2132,15 @@ def resolve(self, model_storage):
# moved to.
plugins = model_storage.plugin.list()
matching_plugins = []
- for plugin in plugins:
- # TODO: we need to use a version comparator
- if (plugin.name == self.name) and \
- ((self.version is None) or (plugin.package_version >=
self.version)):
- matching_plugins.append(plugin)
+ if plugins:
+ for plugin in plugins:
+ if (plugin.name == self.name) and \
--- End diff --
I know that wrapping `if` conditions with parenthesis is your thing, but in
this case it seems to cause some clutter...
> General purpose version comparison
> ----------------------------------
>
> Key: ARIA-140
> URL: https://issues.apache.org/jira/browse/ARIA-140
> Project: AriaTosca
> Issue Type: Story
> Reporter: Tal Liron
> Assignee: Tal Liron
> Priority: Minor
>
> Add {{aria.utils.versions}} to allow for general-purpose comparison and
> sorting of version strings.
> For now this will be used for resolving plugin specifications to plugins, but
> it may very well have other uses in the future.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)