def CheckForQuestionPending(task):
 vm = task.info.entity
 if ((vm is not None) and isinstance(vm, vim.VirtualMachine)):
  qst = vm.runtime.question
  if (qst is not None):
   raise TaskBlocked('Task blocked, User Intervention required')

def CheckForQuestionPending ( task ) : vm = task . info . entity if ( ( vm is not None ) and isinstance ( vm , vim . VirtualMachine ) ) : qst = vm . runtime . question if ( qst is not None ) : raise TaskBlocked ( 'Task blocked, User Intervention required' )
check to see if vm needs to ask a question .