diff options
author | Devan Goodwin <dgoodwin@redhat.com> | 2016-05-30 14:41:57 -0300 |
---|---|---|
committer | Devan Goodwin <dgoodwin@redhat.com> | 2016-05-30 14:41:57 -0300 |
commit | bab4a4b6aeeb12b5c1fb412a3a95c5d8c90249e4 (patch) | |
tree | 602d9cf13a27ff7cc7ee00451d8aeca67f9f0d51 | |
parent | 1d4a3de319f3e3f33bd5bd65298c68c04f576085 (diff) | |
download | openshift-bab4a4b6aeeb12b5c1fb412a3a95c5d8c90249e4.tar.gz openshift-bab4a4b6aeeb12b5c1fb412a3a95c5d8c90249e4.tar.bz2 openshift-bab4a4b6aeeb12b5c1fb412a3a95c5d8c90249e4.tar.xz openshift-bab4a4b6aeeb12b5c1fb412a3a95c5d8c90249e4.zip |
Fix image tag to rpm version filter.
-rw-r--r-- | filter_plugins/oo_filters.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/filter_plugins/oo_filters.py b/filter_plugins/oo_filters.py index 260dea92c..7510975f2 100644 --- a/filter_plugins/oo_filters.py +++ b/filter_plugins/oo_filters.py @@ -881,13 +881,12 @@ class FilterModule(object): """ if not isinstance(version, basestring): raise errors.AnsibleFilterError("|failed expects a string or unicode") - # TODO: Do we need to make this actually convert v1.2.0-rc1 into 1.2.0-0.rc1 - # We'd need to be really strict about how we build the RPM Version+Release if version.startswith("v"): version = version[1:] + # Strip release from requested version, we no longer support this. version = version.split('-')[0] - if include_dash and not version.startswith("-"): + if include_dash and version and not version.startswith("-"): version = "-" + version return version |