Add the options attribute to cli.JobExecutor
authorIustin Pop <iustin@google.com>
Tue, 9 Feb 2010 14:43:23 +0000 (15:43 +0100)
committerIustin Pop <iustin@google.com>
Thu, 11 Feb 2010 11:50:08 +0000 (12:50 +0100)
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

lib/cli.py

index d420361..f016ac4 100644 (file)
@@ -1759,13 +1759,14 @@ class JobExecutor(object):
   GetResults() calls.
 
   """
-  def __init__(self, cl=None, verbose=True):
+  def __init__(self, cl=None, verbose=True, opts=None):
     self.queue = []
     if cl is None:
       cl = GetClient()
     self.cl = cl
     self.verbose = verbose
     self.jobs = []
+    self.opts = opts
 
   def QueueJob(self, name, *ops):
     """Record a job for later submit.
@@ -1773,6 +1774,7 @@ class JobExecutor(object):
     @type name: string
     @param name: a description of the job, will be used in WaitJobSet
     """
+    SetGenericOpcodeOpts(ops, self.opts)
     self.queue.append((name, ops))
 
   def SubmitPending(self):