grr/core/grr_response_core/lib/util/temp.py
def _TempRootPath():
  """Returns a default root path for storing temporary files."""
  # `FLAGS.test_tmpdir` is defined only in test environment, so we can't expect
  # for it to be always defined.
  test_tmpdir = (
      compatibility.Environ("TEST_TMPDIR", default=None) or
      FLAGS.get_flag_value("test_tmpdir", default=None))

  if not os.path.exists(test_tmpdir):
    os.makedirs(test_tmpdir)

  # TODO(hanuszczak): Investigate whether this check still makes sense.
  if platform.system() == "Windows":
    return None

  return test_tmpdir
Returns a default root path for storing temporary files.
Returns a default root path for storing temporary files.
Returns a default root path for storing temporary files .
def _TempRootPath():
  test_tmpdir = (
      compatibility.Environ("TEST_TMPDIR", default=None) or
      FLAGS.get_flag_value("test_tmpdir", default=None))
  if not os.path.exists(test_tmpdir):
    os.makedirs(test_tmpdir)
  if platform.system() == "Windows":
    return None
  return test_tmpdir
def _TempRootPath ( ) : test_tmpdir = ( compatibility . Environ ( "TEST_TMPDIR" , default = None ) or FLAGS . get_flag_value ( "test_tmpdir" , default = None ) ) if not os . path . exists ( test_tmpdir ) : os . makedirs ( test_tmpdir ) if platform . system ( ) == "Windows" : return None return test_tmpdir
Returns a default root path for storing temporary files.
Returns a default root path for storing temporary files .
"""Returns a default root path for storing temporary files.""" # `FLAGS.test_tmpdir` is defined only in test environment, so we can't expect # for it to be always defined. # TODO(hanuszczak): Investigate whether this check still makes sense.