File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/renderers/__pycache__/mako.cpython-310.pyc
o
�N�g� � @ s. d Z ddlZddlZddlmZ ddd�ZdS ) z�
Mako Renderer for Salt
This renderer requires the Mako library.
To install Mako, do the following:
.. code-block: bash
salt-pip install mako
� N)�SaltRenderError�base� c K sT t jjj| fdtttt||||d� |��}|�dd�s#t |�dd���t
�|d �S )z|
Render the template_file, passing the functions and grains into the
Mako rendering system.
:rtype: string
T) Zto_str�saltZgrains�optsZpillar�saltenv�sls�context�tmplpath�resultF�dataz%Unknown render error in mako renderer)r �utilsZ templatesZMAKOZ__salt__Z
__grains__Z__opts__Z
__pillar__�getr �io�StringIO)Z
template_filer r r r
�kwsZtmp_data� r �G/opt/saltstack/salt/lib/python3.10/site-packages/salt/renderers/mako.py�render s( ���
�r )r r NN)�__doc__r Zsalt.utils.templatesr Zsalt.exceptionsr r r r r r �<module> s