Logo Search packages:      
Sourcecode: namebench version File versions  Download package

def libnamebench::history_parser::HistoryParser::ParseByType (   self,
  source,
  complain = True,
  store = False 
)

Given a type, parse the newest file and return a list of hosts.

Definition at line 100 of file history_parser.py.

00100                                                            :
    """Given a type, parse the newest file and return a list of hosts."""

    (paths, tried) = self.FindGlobPaths(self.GetTypeMethod(source)())
    if not paths:
      if complain:
        print "- %s: no matches in %s" % (source, tried)
      return False
    newest = sorted(paths, key=os.path.getmtime)[-1]

    # Do not use this with multiple threads.
    results = self.ParseByFilename(newest)
    if store:
      self.imported_sources[source] = results
    return results

  def ParseAllTypes(self):


Generated by  Doxygen 1.6.0   Back to index