%PDF- %PDF-
Direktori : /usr/lib/python2.7/site-packages/salt/utils/ |
Current File : //usr/lib/python2.7/site-packages/salt/utils/yamlencoding.pyo |
� ���^c @@ s� d Z d d l m Z m Z m Z d d l Z d d l Z d d l m Z d d l m Z e � d � � Z e � d � � Z e � d � � Z d S( u9 Functions for adding yaml encoding to the jinja context i ( t absolute_importt print_functiont unicode_literalsN( t six( t jinja_filterc C@ sT t j � �B } t j j | d t j �} | j t j | � � | j � SWd QXd S( u� Make text into a double-quoted YAML string with correct escaping for special characters. Includes the opening and closing double quote characters. t widthN( t iot StringIOt yamlt emittert EmitterR t MAXSIZEt write_double_quotedt text_typet getvalue( t textt ostreamt yemitter( ( s; /usr/lib/python2.7/site-packages/salt/utils/yamlencoding.pyt yaml_dquote s c C@ sT t j � �B } t j j | d t j �} | j t j | � � | j � SWd QXd S( u� Make text into a single-quoted YAML string with correct escaping for special characters. Includes the opening and closing single quote characters. R N( R R R R R R R t write_single_quotedR R ( R R R ( ( s; /usr/lib/python2.7/site-packages/salt/utils/yamlencoding.pyt yaml_squote s c C@ s� t j j � } | j | � } t | t j � sN t d j t | � � � � n | j j d d � d } | j } | d k r� t | j � } n | S( un A simple YAML encode that can take a single-element datatype and return a string representation. u>