(self, target_name)
return scratch_dir
Create a temporary scratch directory, and return its path.

        The scratch directory is generated inside the temp directory
        of this AutoInstaller instance.  This method also creates the
        temp directory if it does not already exist.
Create a temporary scratch directory, and return its path.
Create a temporary scratch directory and return its path .
def _create_scratch_directory(self, target_name):
        """Create a temporary scratch directory, and return its path.

        The scratch directory is generated inside the temp directory
        of this AutoInstaller instance.  This method also creates the
        temp directory if it does not already exist.

        """
        prefix = target_name.replace(os.sep, "_") + "_"
        try:
            scratch_dir = self._create_scratch_directory_inner(prefix)
        except OSError:
            # Handle case of containing temp directory not existing--
            # OSError: [Errno 2] No such file or directory:...
            temp_dir = self._temp_dir
            if temp_dir is None or os.path.exists(temp_dir):
                raise
            # Else try again after creating the temp directory.
            os.makedirs(temp_dir)
            scratch_dir = self._create_scratch_directory_inner(prefix)

        return scratch_dir
def _create_scratch_directory ( self , target_name ) : prefix = target_name . replace ( os . sep , "_" ) + "_" try : scratch_dir = self . _create_scratch_directory_inner ( prefix ) except OSError : # Handle case of containing temp directory not existing-- # OSError: [Errno 2] No such file or directory:... temp_dir = self . _temp_dir if temp_dir is None or os . path . exists ( temp_dir ) : raise # Else try again after creating the temp directory. os . makedirs ( temp_dir ) scratch_dir = self . _create_scratch_directory_inner ( prefix ) return scratch_dir