From ed21712bb20bde627e1f923f049f84bd5f6bf590 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Sun, 19 Jul 2009 04:01:16 +0200
Subject: [PATCH] Fix an error path in job queue worker's RunTask

In case the job fails, we try to set the job's run_op_idx to -1.
However, this is a wrong variable, which wasn't detected until the
__slots__ addition. The correct variable is run_op_index.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
---
 lib/jqueue.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/jqueue.py b/lib/jqueue.py
index 78199141c..3f533323b 100644
--- a/lib/jqueue.py
+++ b/lib/jqueue.py
@@ -455,7 +455,7 @@ class _JobQueueWorker(workerpool.BaseWorker):
       queue.acquire()
       try:
         try:
-          job.run_op_idx = -1
+          job.run_op_index = -1
           job.end_timestamp = TimeStampNow()
           queue.UpdateJobUnlocked(job)
         finally:
-- 
GitLab