File: //lib/python3.6/site-packages/awscli/customizations/eks/__pycache__/ordered_yaml.cpython-36.pyc
3
�T_H � @ s| d dl Z d dlmZ G dd� de j�ZG dd� de j�Zdd� Zeje j j
je� d d
� Zej
ee� dd� Zdd
d�ZdS )� N)�OrderedDictc @ s e Zd ZdZdS )�SafeOrderedLoaderz- Safely load a yaml file into an OrderedDict.N)�__name__�
__module__�__qualname__�__doc__� r r �"/usr/lib/python3.6/ordered_yaml.pyr s r c @ s e Zd ZdZdS )�SafeOrderedDumperz$ Safely dump an OrderedDict as yaml.N)r r r r r r r r r
s r
c C s | j |� t| j|��S )N)Zflatten_mappingr Zconstruct_pairs)�loaderZnoder r r �_ordered_constructor s
r c C s | j tjjj|j� �S )N)Zrepresent_mapping�yaml�resolver�BaseResolver�DEFAULT_MAPPING_TAG�items)Zdumper�datar r r �_ordered_representer$ s r c C s t j| t�S )z/ Load an OrderedDict object from a yaml stream.)r
�loadr )�streamr r r �ordered_yaml_load- s r c C s t j| |tdd�S )z�
Dump an OrderedDict object to yaml.
:param to_dump: The OrderedDict to dump
:type to_dump: OrderedDict
:param stream: The file to dump to
If not given or if None, only return the value
:type stream: file
F)Zdefault_flow_style)r
�dumpr
)Zto_dumpr r r r �ordered_yaml_dump2 s r )N)r
Zbotocore.compatr Z
SafeLoaderr Z
SafeDumperr
r Zadd_constructorr r r r Zadd_representerr r r r r r �<module> s