(self, content)
return tmp
Creates temp file and write content to the file.

        :param content: file content
        :returns: temp file
Creates temp file and write content to the file.
Creates temp file and write content to the file .
def _create_temp_file_with_content(self, content):
        """Creates temp file and write content to the file.

        :param content: file content
        :returns: temp file
        """
        try:
            tmp = tempfile.NamedTemporaryFile(delete=True)
            tmp.write(content)
            tmp.flush()
        except Exception as err:
            LOG.error("Error while creating temp file: %s", err)
            raise
        return tmp
def _create_temp_file_with_content ( self , content ) : try : tmp = tempfile . NamedTemporaryFile ( delete = True ) tmp . write ( content ) tmp . flush ( ) except Exception as err : LOG . error ( "Error while creating temp file: %s" , err ) raise return tmp