Fix RuntimeError in owner-sync-pagure.j2
This is a small follow up fix related to 01be34a706
.
Previously the script modified a list while iterating through it, which
is always a bad idea, but it didn't throw an error. My last changes
switched it to iterating through a list, which surfaced the flaw as a
RuntimeError. Using a set comprehension is a cleaner way to generate
the set we need to return.
Signed-off-by: Carl George <carlwgeorge@gmail.com>
This commit is contained in:
parent
6e70c6fc3a
commit
fffd852e6e
1 changed files with 5 additions and 5 deletions
|
@ -175,11 +175,11 @@ def get_project_name_and_its_active_branches(session, namespace, active_branches
|
|||
print('- Querying pagure distgit for package branches')
|
||||
project_branches = get_project_branches(session, namespace, project_name)
|
||||
try:
|
||||
active_package_branches = active_branches & project_branches
|
||||
for branch in active_package_branches:
|
||||
if branch in lookaside:
|
||||
if project_name in lookaside[branch]:
|
||||
active_package_branches.remove(branch)
|
||||
active_package_branches = {
|
||||
branch
|
||||
for branch in active_branches & project_branches
|
||||
if not (branch in lookaside and project_name in lookaside[branch])
|
||||
}
|
||||
|
||||
return project_name, active_package_branches
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue