HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/renderers/__pycache__/jinja.cpython-310.pyc
o

�N�g��@sbdZddlZddlmZddlZddlmZddlm	Z	e�
e�Zdd�Z
							dd
d�ZdS)
z{
Jinja loading utils to enable a more powerful backend for jinja templates

.. include:: ../../../_incl/jinja_security.rst
�N)�StringIO)�SaltRenderError)�NamedLoaderContextcCs�t}ttt�rtt��t�rt��}t|t�s|St|�}|����D]\}}|�dd�\}}||vr9dd�||<t||||�q#|S)z�
    Create a copy of __salt__ dictionary with module.function and module[function]

    Takes advantage of Jinja's syntactic sugar lookup:

    .. code-block::

        {{ salt.cmd.run('uptime') }}
    �.�cSsdS)N�rrr�H/opt/saltstack/salt/lib/python3.10/site-packages/salt/renderers/jinja.py�<lambda>%sz%_split_module_dicts.<locals>.<lambda>)	Z__salt__�
isinstancer�value�dict�copy�items�split�setattr)�funcsZmod_dictZmodule_func_nameZmod_fun�modZfunrrr�_split_module_dictss

r�base�c	Ks�|dk}|s|rtd|����tjjj|fdt�ttt||||t	|d�|��}|�
dd�s5t|�
dd���t|dt�rE|d�
t�|d<t|d�S)	z}
    Render the template_file, passing the functions and grains into the
    Jinja rendering system.

    :rtype: string
    z-szUnknown renderer option: T)Zto_str�saltZgrains�optsZpillar�saltenv�sls�context�tmplpath�proxy�from_str�resultF�dataz&Unknown render error in jinja renderer)rr�utilsZ	templatesZJINJArZ
__grains__Z__opts__Z
__pillar__Z	__proxy__�getr
�bytes�decodeZ__salt_system_encoding__r)	Z
template_filerrZarglinerr�kwsrZtmp_datarrr�render*s6��
�
�r%)rrrNN)�__doc__�logging�iorZsalt.utils.templatesrZsalt.exceptionsrZsalt.loader.contextr�	getLogger�__name__�logrr%rrrr�<module>s
�