original_docstring:  Ensures the information from the Luci router is up to date.
              Returns boolean if scanning successful. 
docstring: Ensures the information from the Luci router is up to date.
  Returns boolean if scanning successful.
docstring_tokens: Ensures the information from the Luci router is up to date . Returns boolean if scanning successful .
code: def _update_info(self):
          """ Ensures the information from the Luci router is up to date.
              Returns boolean if scanning successful. """
          if not self.success_init:
              return False
          with self.lock:
              # if date_updated is None or the date is too old we scan
              # for new data
              if not self.date_updated or \
                 datetime.now() - self.date_updated > MIN_TIME_BETWEEN_SCANS:
  
                  self.logger.info("Checking ARP")
  
                  url = 'http://{}/cgi-bin/luci/rpc/sys'.format(self.host)
                  result = self._req_json_rpc(url, 'net.arptable',
                                              params={'auth': self.token})
                  if result:
                      self.last_results = [x['HW address'] for x in result]
                      self.date_updated = datetime.now()
                      return True
                  return False
  
              return True
code_tokens: def _update_info ( self ) : if not self . success_init : return False with self . lock : if not self . date_updated or datetime . now ( ) - self . date_updated > MIN_TIME_BETWEEN_SCANS : self . logger . info ( "Checking ARP" ) url = 'http://{}/cgi-bin/luci/rpc/sys' . format ( self . host ) result = self . _req_json_rpc ( url , 'net.arptable' , params = { 'auth' : self . token } ) if result : self . last_results = [ x [ 'HW address' ] for x in result ] self . date_updated = datetime . now ( ) return True return False return True
short_docstring: Ensures the information from the Luci router is up to date.
short_docstring_tokens: Ensures the information from the Luci router is up to date .
comment: """ Ensures the information from the Luci router is up to date.
              Returns boolean if scanning successful. """$SEP$# if date_updated is None or the date is too old we scan$SEP$# for new data