hub: fix Task.lock for correctly closed tasks
Fixes: https://pagure.io/koji/issue/3220
This commit is contained in:
parent
355be9200f
commit
edad8d4461
1 changed files with 5 additions and 3 deletions
|
|
@ -214,9 +214,11 @@ class Task(object):
|
|||
log_error(f"Error: task {task_id} is already open and handled by "
|
||||
f"{host_id} (double open/assign)")
|
||||
return False
|
||||
elif otherhost is None: # CLOSED, FAILED
|
||||
log_error(f"Error: task {task_id} is non-free but not handled by any host "
|
||||
f"(state {koji.TASK_STATES[state]})")
|
||||
else:
|
||||
# state is CLOSED or FAILED
|
||||
if otherhost is None:
|
||||
log_error(f"Error: task {task_id} is non-free but not handled by any host "
|
||||
f"(state {koji.TASK_STATES[state]})")
|
||||
return False
|
||||
# if we reach here, task is either
|
||||
# - free and unlocked
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue