Revision 03b179ce lib/client/gnt_debug.py

b/lib/client/gnt_debug.py
188 188
  """
189 189
  ToStdout("Testing job dependencies")
190 190

  
191
  cl = cli.GetClient()
192

  
193 191
  try:
192
    cl = cli.GetClient()
194 193
    SubmitOpCode(opcodes.OpTestDelay(duration=0, depends=[(-1, None)]), cl=cl)
195 194
  except errors.GenericError, err:
196 195
    if opts.debug:
......
218 217
                                           ht.TOr(ht.TNonEmptyString,
219 218
                                                  ht.TJobId)])))
220 219

  
220
  cl = cli.GetClient()
221 221
  result = cl.SubmitManyJobs(jobs)
222 222
  if not check_fn(result):
223 223
    raise errors.OpExecError("Job submission doesn't match %s: %s" %
......
287 287
        (4, 2, priority + offset),
288 288
        ])
289 289

  
290
  cl = cli.GetClient()
291

  
292 290
  for before, after, failpriority in testdata:
293 291
    ops = []
294 292
    ops.extend([opcodes.OpTestDelay(duration=0) for _ in range(before)])
......
296 294
    ops.extend([opcodes.OpTestDelay(duration=0) for _ in range(after)])
297 295

  
298 296
    try:
297
      cl = cli.GetClient()
299 298
      cl.SubmitJob(ops)
300 299
    except errors.GenericError, err:
301 300
      if opts.debug:
......
312 311
      ops,
313 312
      ]
314 313
    try:
314
      cl = cli.GetClient()
315 315
      cl.SubmitManyJobs(jobs)
316 316
    except errors.GenericError, err:
317 317
      if opts.debug:

Also available in: Unified diff