Commit 6e237482 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

jqueue: Fix error when WaitForJobChange gets invalid ID

When JobQueue.WaitForJobChange gets an invalid or no longer existing job ID it
tries to return job_info and log_entries, both of which aren't defined yet.
Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarIustin Pop <>
parent a9e97393
......@@ -1101,6 +1101,10 @@ class JobQueue(object):
logging.debug("Waiting for changes in job %s", job_id)
job_info = None
log_entries = None
end_time = time.time() + timeout
while True:
delta_time = end_time - time.time()
......@@ -1142,7 +1146,10 @@ class JobQueue(object):
logging.debug("Job %s changed", job_id)
return (job_info, log_entries)
if job_info is None and log_entries is None:
return None
return (job_info, log_entries)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment