
    ceg                     .     G d  de       Z G d d      Zy)c                       e Zd Zd Zd Zy)
ParseErrorc                 .    || _         || _        || _        y N)msglinelineno)selfmessager   r   s       7/usr/lib/python3/dist-packages/oslo_config/iniparser.py__init__zParseError.__init__   s    	    c                 N    d| j                   | j                  | j                  fz  S )Nzat line %d, %s: %r)r   r   r   )r	   s    r   __str__zParseError.__str__   s     #t{{DHHdii&HHHr   N)__name__
__module____qualname__r   r    r   r   r   r      s    
Ir   r   c                   \    e Zd ZdZeZd Zd Zd Zd Z	d Z
d Zd Zd	 Zd
 Zd Zd Zd Zy)
BaseParser    c                 .    | j                  ||       d g fS r   )
assignmentr	   keyvalues      r   _assignmentzBaseParser._assignment   s    U#Rxr   c                     |j                  d      s| j                  |      S t        |      dk  r| j                  |      S |dd S )N]      )endswitherror_no_section_end_bracketlenerror_no_section_namer	   r   s     r   _get_sectionzBaseParser._get_section"   sG    }}S!44T::t9>--d33Abzr   c                 \   |j                  d      }|j                  d      }|dk  r|dk  r| j                  |      S |dk  s
|dk\  r||k  r|d | ||dz   d  }}n|d | ||dz   d  }}|j                         }|r!|d   |d   k(  r|j                  d      r|dd }|j                         |gfS )N:=r   r    r!   )"')finderror_invalid_assignmentstrip
startswith)r	   r   colonequalr   r   s         r   _split_key_valuezBaseParser._split_key_value*   s    		#		#19006619!futEAIJ'7CfutEAIJ'7CU1Xr*u/?/?/L!BKEyy{UG##r   c                    d }g }|D ]3  }| xj                   dz  c_         |j                         }|s|r| j                  ||      \  }}C|j                  d      r4|| j	                  |       n|j                  |j                                |r| j                  ||      \  }}|j                  d      r&| j                  |      }|s| j                  |       |j                  d      r$| j                  |dd  j                                | j                  |      \  }}|r#| j                  |      c S  |r| j                  ||       y y )Nr    ) 	[)#;)r   rstripr   r0   error_unexpected_continuationappendlstripr'   new_sectioncommentr3   error_empty_key)r	   lineiterr   r   r   sections         r   parsezBaseParser.parse:   s5    	6DKK1K;;=D!%!1!1#u!=JC-;66t<LL/!--c59
Us#++D1$$W-,T!"X__./!2248
U//55?	6B S%( r   c                     t               )z(Called when a full assignment is parsed.NotImplementedErrorr   s      r   r   zBaseParser.assignmentc       !##r   c                     t               )z%Called when a new section is started.rE   )r	   rB   s     r   r>   zBaseParser.new_sectiong   rG   r   c                      y)z Called when a comment is parsed.Nr   )r	   r?   s     r   r?   zBaseParser.commentk   s    r   c                 <    | j                  d| j                  |      )Nz!No ':' or '=' found in assignment	parse_excr   r&   s     r   r.   z#BaseParser.error_invalid_assignmento       nn@![[$0 	0r   c                 <    | j                  d| j                  |      )NzKey cannot be emptyrK   r&   s     r   r@   zBaseParser.error_empty_keys   s    nn2DKKFFr   c                 <    | j                  d| j                  |      )NzUnexpected continuation linerK   r&   s     r   r;   z(BaseParser.error_unexpected_continuationv   s    nn;![[$0 	0r   c                 <    | j                  d| j                  |      )Nz!Invalid section (must end with ])rK   r&   s     r   r#   z'BaseParser.error_no_section_end_bracketz   rM   r   c                 <    | j                  d| j                  |      )NzEmpty section namerK   r&   s     r   r%   z BaseParser.error_no_section_name~   s    nn14;;EEr   N)r   r   r   r   r   rL   r   r'   r3   rC   r   r>   r?   r.   r@   r;   r#   r%   r   r   r   r   r      sK    FI$ ')R$$0G00Fr   r   N)	Exceptionr   r   r   r   r   <module>rS      s!    I IeF eFr   