+
    Ki+  c                   sb    R t ^ RIt^ RIt^ RIHt ^ RIHt ^ RIHt ^ RI	H
t
 R R ltR R	 ltR# )
z#Utility functions for YAML handlingN)ParserError)ScannerError)logger)path_existsc                s0    V ^8  d   QhR\         R\        /# )   filenamereturn)strdictZformat   "5/usr/lib/python3.14/site-packages/lutris/util/yaml.py__annotate__r      s     
 
# 
$ 
    c                s4   \        V 4      '       g   / # \        V RRR7      ;_uu_ 4       p \        P                  ! V4      ;'       g    / pRRR4       V#   \        \
        3 d    \        P                  ! RT 4       / p L6i ; i  + '       g   i     X# ; i)z$Read filename and return parsed yamlZrutf-8Zencodingzerror parsing file %sN)r   openyamlZ	safe_loadr   r    r   Zerror)r   Z	yaml_fileZyaml_contents   &  r   read_yaml_from_filer      s    x  		hg	.	.)	>>)4::L 
/  k* 	LL0(;L	 
/	. s(   B A*B BBBB	c                s4    V ^8  d   QhR\         R\        RR/# )r   configfilepathr   N)r   r   r	   r
   r   r   r      s!     
! 
!t 
!s 
!t 
!r   c                 s   \         P                  ! V R R7      pVR,           p \        VRRR7      ;_uu_ 4       pVP                  V4       RRR4       \        P
                  ! W14       \        P                  P                  V4      '       d   \        P                  ! V4       R# R#   + '       g   i     Le; i  \        P                  P                  T4      '       d   \        P                  ! T4       i i ; i)F)Zdefault_flow_stylez.tmpZwr   r   N)	r   Z	safe_dumpr   ZwriteosZrenameZpathZisfileZunlink)r   r   Zyaml_configZ	temp_pathZfilehandlers   &&   r   write_yaml_to_filer      s    ..EBK6!I!)S733{k* 4
		)&77>>)$$IIi  %	 43 77>>)$$IIi  %s"   B; B(B; (B8	3B; ;>C9)Z__doc__r   r   Zyaml.parserr    Zyaml.scannerr   Zlutris.util.logr   Zlutris.util.systemr   r   r   ) r   r   <module>r      s$    ) 	  # % " *

!r   