parameters: (self, status)
return_statement: return True
docstring: Waiting for status.
          @param status: status.
          @return: always True.
docstring_summary: Waiting for status.
docstring_tokens: Waiting for status .
function: def wait(self, status):
          """Waiting for status.
          @param status: status.
          @return: always True.
          """
          log.debug("%s: waiting for status 0x%.04x", self.id, status)
  
          end = time.time() + self.timeout
          self.server._set_timeout(self.timeout)
  
          while db.guest_get_status(self.task_id) == "starting" and self.do_run:
              # Check if we've passed the timeout.
              if time.time() > end:
                  raise CuckooGuestCriticalTimeout(
                      "Machine %s: the guest initialization hit the "
                      "critical timeout, analysis aborted." % self.id
                  )
  
              try:
                  # If the server returns the given status, break the loop
                  # and return.
                  if self.server.get_status() == status:
                      log.debug("%s: status ready", self.id)
                      break
              except:
                  pass
  
              log.debug("%s: not ready yet", self.id)
              time.sleep(1)
  
          self.server._set_timeout(None)
          return True
function_tokens: def wait ( self , status ) : log . debug ( "%s: waiting for status 0x%.04x" , self . id , status ) end = time . time ( ) + self . timeout self . server . _set_timeout ( self . timeout ) while db . guest_get_status ( self . task_id ) == "starting" and self . do_run : # Check if we've passed the timeout. if time . time ( ) > end : raise CuckooGuestCriticalTimeout ( "Machine %s: the guest initialization hit the " "critical timeout, analysis aborted." % self . id ) try : # If the server returns the given status, break the loop # and return. if self . server . get_status ( ) == status : log . debug ( "%s: status ready" , self . id ) break except : pass log . debug ( "%s: not ready yet" , self . id ) time . sleep ( 1 ) self . server . _set_timeout ( None ) return True