
    ܍~c                     j    d dl Z d dlZd dlZd dlZd dlZdZ ej        e          ZeddfdZ	efdZ
dS )    Ni  wbFc           
      p   |r?	 t          j        |           }t          j        |j                  }n# t          $ r Y nw xY wd }	 t          j        t           j                            |           d|          }t          
                    d| |j        ||t          |                     |                    |           |                                 t          j        |j        |           t          j        |j        |            d S # t"          $ r"}|t          j        |j                   |d }~ww xY w)NF)dirdeletemodezOAtomically writing to file %s (via temporary file %s) - %s: [%o] %d bytes/chars)osstatS_IMODEst_modeOSErrortempfileNamedTemporaryFilepathdirnameLOGdebugnamelenwriteclosechmodrename	Exceptionunlink)filenamecontentr   omodepreserve_mode	file_stattfes           9/usr/lib/python3/dist-packages/cloudinit/atomic_helper.py
write_filer#      sJ   
  	))I<	 122DD 	 	 	D	 
B())%e
 
 
 			GLL	
 	
 	
 	




$
	"'8$$$$$   >Ibgs%   -2 
??CD	 	
D5D00D5c                 X    t          | t          j        |dd          dz   d|          S )N   T)indent	sort_keys
w)r   r   )r#   jsondumps)r   datar   s      r"   
write_jsonr-   1   s;    
4T222T9	       )r*   loggingr   r	   r   
_DEF_PERMS	getLogger__name__r   r#   r-    r.   r"   <module>r4      s      				  
g!! 'd%! ! ! !H %/      r.   