From c910bccb46a42f613870ee2ec994bff96c942c78 Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Fri, 11 Jun 2010 11:34:34 +0100
Subject: [PATCH] Fix a TODO in _QueuedJob

Rather than raising Exception use GenericError and explain a bit better
what happened.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
---
 lib/jqueue.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/jqueue.py b/lib/jqueue.py
index a830fdae6..49ce3c4a5 100644
--- a/lib/jqueue.py
+++ b/lib/jqueue.py
@@ -177,8 +177,7 @@ class _QueuedJob(object):
 
     """
     if not ops:
-      # TODO: use a better exception
-      raise Exception("No opcodes")
+      raise errors.GenericError("A job needs at least one opcode")
 
     self.queue = queue
     self.id = job_id
-- 
GitLab