mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-29 20:34:22 +01:00
Converted to generator
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
parent
e49052f5b3
commit
3cc70413cd
1 changed files with 2 additions and 4 deletions
|
@ -29,11 +29,9 @@ def remove_repositories(repositories, default_repositories):
|
|||
"""
|
||||
Remove no default repositories
|
||||
"""
|
||||
repos = []
|
||||
for repo in repositories:
|
||||
if repo in default_repositories:
|
||||
repos.append(repo)
|
||||
return repos
|
||||
yield repo
|
||||
|
||||
|
||||
def update_repositories(repositories, conf_path):
|
||||
|
@ -194,7 +192,7 @@ class MetaData:
|
|||
mles_sub_repo = grab_sub_repo(repositories, "mles")
|
||||
|
||||
# remove no default repositories
|
||||
repositories = remove_repositories(repositories, default_repositories)
|
||||
repositories = list(remove_repositories(repositories, default_repositories))
|
||||
# add custom repositories
|
||||
update_repositories(repositories, conf_path)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue