Converted to generator

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2020-01-29 22:48:00 +01:00
parent a97ed2a8ea
commit 9504228619

View file

@ -191,7 +191,6 @@ class BinaryInstall:
lowercase lowercase
""" """
if "--case-ins" in self.flag: if "--case-ins" in self.flag:
data = []
data = list(Utils().package_name(self.PACKAGES_TXT)) data = list(Utils().package_name(self.PACKAGES_TXT))
data_dict = Utils().case_sensitive(data) data_dict = Utils().case_sensitive(data)
for pkg in self.packages: for pkg in self.packages:
@ -271,18 +270,16 @@ class BinaryInstall:
dependencies = [] dependencies = []
dependencies = Utils().dimensional_list(Dependencies( dependencies = Utils().dimensional_list(Dependencies(
self.repo, self.blacklist).binary(dep, self.flag)) self.repo, self.blacklist).binary(dep, self.flag))
requires += self._fix_deps_repos(dependencies) requires += list(self._fix_deps_repos(dependencies))
self.deps_dict[dep] = Utils().remove_dbs(requires) self.deps_dict[dep] = Utils().remove_dbs(requires)
return Utils().remove_dbs(requires) return Utils().remove_dbs(requires)
def _fix_deps_repos(self, dependencies): def _fix_deps_repos(self, dependencies):
"""Fix store deps include in repository """Fix store deps include in repository
""" """
requires = []
for dep in dependencies: for dep in dependencies:
if dep in self.repo_pkg_names: if dep in self.repo_pkg_names:
requires.append(dep) yield dep
return requires
def views(self, install, comp_sum): def views(self, install, comp_sum):
"""Views packages """Views packages