tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

noop_output_manager.py (972B)


      1 # Copyright 2017 The Chromium Authors
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 from pylib.base import output_manager
      6 
      7 # TODO(jbudorick): This class is currently mostly unused.
      8 # Add a --bot-mode argument that all bots pass. If --bot-mode and
      9 # --local-output args are both not passed to test runner then use this
     10 # as the output manager impl.
     11 
     12 # pylint: disable=no-self-use
     13 
     14 class NoopOutputManager(output_manager.OutputManager):
     15 
     16  #override
     17  def _CreateArchivedFile(self, out_filename, out_subdir, datatype):
     18    del out_filename, out_subdir, datatype
     19    return NoopArchivedFile()
     20 
     21 
     22 class NoopArchivedFile(output_manager.ArchivedFile):
     23 
     24  def __init__(self):
     25    super().__init__(None, None, None)
     26 
     27  def Link(self):
     28    """NoopArchivedFiles are not retained."""
     29    return ''
     30 
     31  def _Link(self):
     32    pass
     33 
     34  def Archive(self):
     35    """NoopArchivedFiles are not retained."""
     36 
     37  def _Archive(self):
     38    pass