%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/share/hplip/base/__pycache__/
Upload File :
Create Path :
Current File : //usr/share/hplip/base/__pycache__/os_utils.cpython-312.pyc

�

=	f	����ddlZddlZddlZddlZddlmZejdejjejj�Z	d�Z
d�Zd�Zd	d�Z
y)
�N�)�logger�c�b�|rtj|�Stjd|z�y)NzCommand not found 
�)�os�system�log�error)�cmds �!/usr/share/hplip/base/os_utils.py�executer!s(��
��y�y��~���	�	�(�3�.�/��c��tjj|�sytjj|�S)N���)r�path�exists�getsize)�filenames r
�getFileSizer,s(��
�7�7�>�>�(�#��
�7�7�?�?�8�$�$rc��tjjd�}tjj|d�}d}tjj	|�s~	tj
d�tj|�}tj|d�tj||tj|tj�||fS||fS#t$r d}tjd|z�Y||fSwxYw)N�~z.hplipri�rzFailed to create %s)rr�
expanduser�joinr�umask�stat�mkdir�chown�ST_UID�ST_GID�OSErrorr
r)�homedir�hplipdir�status�ss    r
�getHPLIPDirr&2s����g�g� � ��%�G��w�w�|�|�G�X�.�H�
�F�
�7�7�>�>�(�#�	8��H�H�Q�K����� �A��H�H�X�u�%��H�H�X�q����~�q����~�>��8���6�8�����	8��F��I�I�+�h�6�7��8���	8�s�"A9C#�##D�Dc���d}	|r�tj|�D]~\}}}|D]7}tjtjj	||�||��9|D]7}	tjtjj	||	�||��9��	|Stj|||�	|S#t
$rd}tjd|z�Y|SwxYw)Nrrz Failed to change ownership of %s)r�walkrrrr!r
r)
r�user�group�	Recursiver$�root�dirs�files�dr�fls
          r
�changeOwnerr1@s���
�F�<��%'�W�W�T�]�
B�!��d�E��B�B��H�H�R�W�W�\�\�$��3�T�5�A�B��B�B��H�H�R�W�W�\�\�$��3�T�5�A�B�
B��M�	
�H�H�T�4��'��M���<����	�	�4�d�:�;��M�<�s�BB9�B9�9#C �C )F)r�os.path�localerrr�Logger�LOG_LEVEL_INFO�LOG_TO_CONSOLEr
rrr&r1�rr
�<module>r8sT��.
��
����f�m�m�B��
�
�4�4�f�m�m�6R�6R�S���%�
�r

Zerion Mini Shell 1.0