#3430 Fix download-task with wait option
Merged 2 years ago by tkopecek. Opened 2 years ago by jcupova.

Fix download-task with wait option
Jana Cupova • 2 years ago  
file modified
+1 -12
@@ -6926,6 +6926,7 @@ 

              koji.TASK_STATES['FAILED']):

          watch_tasks(session, [base_task_id], quiet=suboptions.quiet,

                      poll_interval=options.poll_interval, topurl=options.topurl)

+         base_task = session.getTaskInfo(base_task_id)

  

      list_tasks = [base_task]

      if not suboptions.parentonly:
@@ -6999,18 +7000,6 @@ 

          print("No files for download found.")

          return

  

-     required_tasks = {}

-     for (task, nop, nop, nop, nop) in downloads:

-         if task["id"] not in required_tasks:

-             required_tasks[task["id"]] = task

- 

-     for task_id in required_tasks:

-         if required_tasks[task_id]["state"] != koji.TASK_STATES.get("CLOSED"):

-             if task_id == base_task_id:

-                 error("Task %d has not finished yet." % task_id)

-             else:

-                 error("Child task %d has not finished yet." % task_id)

- 

      downloads_new_names = [(new_filename, vol) for (_, _, vol, new_filename, _) in downloads]

      if not suboptions.dirpertask:

          not_uniques = list({x for x in downloads_new_names if downloads_new_names.count(x) > 1})

no initial comment

@tkopecek this fix should be in Koji 1.29.1...please don't forget to add it there.

Commit 7833a1b fixes this pull-request

Pull-Request has been merged by tkopecek

2 years ago

Metadata Update from @jcupova:
- Pull-request tagged with: testing-ready

2 years ago

Metadata Update from @jcupova:
- Pull-request tagged with: testing-done

2 years ago