File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/output/__pycache__/yaml_out.cpython-310.pyc
o
�N�g � @ s6 d Z ddlZddlZdZe�e�Zdd� Zdd� Z dS )a�
Display return data in YAML format
==================================
This outputter defaults to printing in YAML block mode for better readability.
CLI Example:
.. code-block:: bash
salt '*' foo.bar --out=yaml
Example output:
CLI Example:
.. code-block:: python
saltmine:
foo:
bar: baz
dictionary:
abc: 123
def: 456
list:
- Hello
- World
� N�yamlc C s t S )N)�__virtualname__� r r �H/opt/saltstack/salt/lib/python3.10/site-packages/salt/output/yaml_out.py�__virtual__( s r c
K s� i }dt vr
|jdd� nt d dkr|jdt d d� n|jddd� ztjjj| fi |��W S tyQ } zddl}t� d||�
| �� W Y d}~dS d}~ww ) z-
Print out YAML using the block mode
Z
output_indentF)�default_flow_styler )r �indentTNz4Exception %s encountered when trying to serialize %s)Z__opts__�update�salt�utilsr Z safe_dump� Exception�pprint�log� exceptionZpformat)�data�kwargs�params�excr
r r r �output, s"