#NEWLINE# def render( template , saltenv = 'base' , sls = '' , tmplpath = None , **kws ) : #NEWLINE# #INDENT# "\n    Render the python module's components\n\n    :rtype: string\n    " #NEWLINE# template = tmplpath #NEWLINE# if ( not os . path . isfile ( template ) ) : #NEWLINE# #INDENT# raise SaltRenderError ( 'Template {0} is not a file!' . format ( template ) ) #NEWLINE# #UNINDENT# tmp_data = salt . utils . templates . py ( template , True , __salt__ = __salt__ , salt = __salt__ , __grains__ = __grains__ , grains = __grains__ , __opts__ = __opts__ , opts = __opts__ , __pillar__ = __pillar__ , pillar = __pillar__ , __env__ = saltenv , saltenv = saltenv , __sls__ = sls , sls = sls , ** sls ) #NEWLINE# if ( not tmp_data . get ( 'result' , False ) ) : #NEWLINE# #INDENT# raise SaltRenderError ( tmp_data . get ( 'data' , 'Unknown render error in py renderer' ) ) #NEWLINE# #UNINDENT# return tmp_data [ 'data' ]