ok

Mini Shell

Direktori : /opt/cloudlinux/venv/lib64/python3.11/site-packages/clcagefslib/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/clcagefslib/__pycache__/io.cpython-311.pyc

�

J��f����ddlZddlZddlZddlZddlZddlZddlmZddlm	Z	ej
e��Zd
d�Z
ejd���Zd�Zdd	�ZdS)�N)�	clcaptain)�ExternalProgramFailedTc�$�	t|d��5}|���cddd��S#1swxYwYdS#ttf$r>t	jd|ztjd��|s�tjd��YdSwxYw)z�
    Helper for read file, process errors and make backup before read
    :param: filename `str` name of file for read
    :param: exit_on_error `bool` use sys.exit on error or raise exception
    �rNzError: failed to read �)	�open�	readlines�OSError�IOError�secureio�logging�SILENT_FLAG�sys�exit)�filename�
exit_on_error�_files   ��/builddir/build/BUILDROOT/cagefs-7.6.18-2.el8.cloudlinux.x86_64/opt/cloudlinux/venv/lib/python3.11/site-packages/clcagefslib/io.py�	read_filers����
�(�C�
 �
 �	%�E��?�?�$�$�	%�	%�	%�	%�	%�	%�	%�	%�	%�	%�	%�	%����	%�	%�	%�	%�	%�	%��
�W�������1�H�<�h�>R�TU�V�V�V��	�����������	���s-�A�3�A�7�A�7�A�AB�Bc� �t|��S)N)r)�paths r�read_file_cachedr$s���T�?�?��c�z�tj|||||tj���}tj|��|duS)N)�logger)r�create_dir_securer
�closefd)r�perm�uid�gid�parent_path�fds      r�make_userdirr#*s=��	�	#�D�$��S�+�h�N^�	_�	_�	_�B���R����
��:�rFc
��|s tj�|���s2	tj|��nj#t$r]}|jt
jkrt�d|�d���nt�	d|��|���Yd}~nd}~wwxYw	tj||��n�#ttf$r�}d|�d|�dt|���dd	����}t�	||���|rtj||d
��nt#|t$j���Yd}~d
Sd}~wwxYwdS)
NzSymlink z does not existz Error: Unable to remove symlink )�exc_infoz Error: failed to create symlink z to z : �ErrnozErr codeT)�fileF)�osr�islink�unlinkr
�errno�ENOENTr�info�errorr�symlinkr�str�replacerr
�printr�stderr)�	dest_path�	link_name�	write_log�force�silent�e�msgs       r�switch_symlinkr;1s�����B�G�N�N�9�-�-��	Y��I�i� � � � ���	Y�	Y�	Y��w�%�,�&�&����A�y�A�A�A�B�B�B�B����K�	�K�K�VW��X�X�X����������		Y����
		���i��3�3�3�3���.�/�	�	�	�w�Y�w�w�I�w�w�RU�VW�RX�RX�R`�R`�ah�jt�Ru�Ru�w�w�C��L�L��q�L�)�)�)��
,�� ��f�d�3�3�3�3��c��
�+�+�+�+��4�4�4�4�4�����	�����5s/�9�
B �AB�B �$B:�:E�A<E
�
E)T)TTF)r+�	functoolsr
r(rr�clcommonr�clcommon.utilsr�	getLogger�__name__rr�cacherr#r;�rr�<module>rCs���

������������	�	�	�	�
�
�
�
�����������0�0�0�0�0�0�
��	�8�	$�	$������"�������
��������r

Zerion Mini Shell 1.0