Revision 7066724d lib/hypervisor/hv_xen.py

b/lib/hypervisor/hv_xen.py
360 360

  
361 361
    return cmd
362 362

  
363
  def _RunXen(self, args):
363
  def _RunXen(self, args, timeout=None):
364 364
    """Wrapper around L{utils.process.RunCmd} to run Xen command.
365 365

  
366
    If a timeout (in seconds) is specified, the command will be terminated after
367
    that number of seconds.
368

  
366 369
    @see: L{utils.process.RunCmd}
367 370

  
368 371
    """
369
    cmd = [self._GetCommand()]
372
    cmd = []
373

  
374
    if timeout is not None:
375
      cmd.extend(["timeout", str(timeout)])
376

  
377
    cmd.extend([self._GetCommand()])
370 378
    cmd.extend(args)
371 379

  
372 380
    return self._run_cmd_fn(cmd)

Also available in: Unified diff