Resolves lookup plugin name duplication issue

The `playbooks/plugins/lookups/py_pkgs.py` had an issue where it's
assumed that the name of a package is always split on an "_" however
a repo name could be anything before the `_git_repo` portion. This
commit corrects that issue.

Change-Id: I49f8a7726ed99e47ff514cdf6e61472fac5b9ed4
Partially-Implements: blueprint master-kilofication
This commit is contained in:
Kevin Carter 2015-04-17 13:30:49 -05:00
parent f13d8cb8a9
commit de28f5a6f8

View File

@ -134,7 +134,7 @@ class DependencyFileProcessor(object):
if git_item.split('_')[0] == 'git':
var_name = 'git'
else:
var_name = git_item.split('_')[0]
var_name = git_item.split('_git_repo')[0]
git_data['repo'] = loaded_yaml.get(git_item)
git_data['branch'] = loaded_yaml.get(
@ -164,7 +164,6 @@ class DependencyFileProcessor(object):
"""Process files.
:type ext: ``tuple``
:type lower_priority: ``bol``
"""
file_names = self._filter_files(
file_names=self.file_names,
@ -185,6 +184,7 @@ class DependencyFileProcessor(object):
if [i for i in BUILT_IN_PIP_PACKAGE_VARS if i in key]:
self.pip['py_package'].extend(values)
def _abs_path(path):
return os.path.abspath(
os.path.expanduser(
@ -192,6 +192,7 @@ def _abs_path(path):
)
)
class LookupModule(object):
def __init__(self, basedir=None, **kwargs):