#NEWLINE# def render_cheetah( source_text , source_path , variables ) : #NEWLINE# #INDENT# assert CheetahTemplate , 'Cheetah is not installed' #NEWLINE# try : #NEWLINE# #INDENT# return str ( CheetahTemplate ( source = source_text , file = source_path , searchList = [ variables ] ) ) #NEWLINE# #UNINDENT# except ( Cheetah . Template . Error , SyntaxError , Cheetah . NameMapper . NotFound ) as error : #NEWLINE# #INDENT# raise errors . TemplateError ( '{0}: {1}: {2}' . format ( source_path , error . __class__ . __name__ , error ) )