%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/DistUpgrade/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/DistUpgrade/__pycache__/DistUpgradePatcher.cpython-312.pyc

�

&��e���2�ddlZddlZGd�de�Zdd�Zy)�Nc��eZdZdZy)�
PatchErrorz  Error during the patch process N)�__name__�
__module__�__qualname__�__doc__���@/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradePatcher.pyrrs��*�r
rc��td�\}}t|d��5}|j�}ddd�dx}}|}	t|d��5}|j�}
ddd�
D�]'}|	|k(r�|j�}|j	d�ra|dd}|jdd�\}}
|
rt
d	��|jd�\}}}tj|||d�
�\}}|||<��|d}|ddjd�\}}}t|�}|dz}|d
k(r|dz}nt|�}|dk(r
||�=|}	|dz}��|dk(r|}	��|dk(r||�=��t
d|z��|	|k(s��|dk(r|}	��|dz
}j||���*d
j�}|rRtj�}|j|j!d��|j#�|k7rt
d��t|dd��5}|j%|�ddd�y#1swY���xYw#1swY���xYw#1swYyxYw)z� python implementation of enough "ed" to apply ed-style
        patches. Note that this patches in memory so its *not*
        suitable for big files
    �zUTF-8)�encodingNrzs/�/�zflags for s// not supported yet)�count����,��c�a�dzunknown command: '%s'z.
z(the md5sum after patching is not correct�wT)�range�open�	readlines�strip�
startswith�rsplitr�	partition�re�subn�int�insert�join�hashlib�md5�update�encode�	hexdigest�write)�orig�edpatch�
result_md5sum�STATE_EXPECT_COMMAND�STATE_EXPECT_DATA�f�
orig_lines�start�end�state�lines�line�subs�flags�regexp�sep�repl�newr�command�	start_str�end_str�resultr&s                        r�patchrAsp�� ��(����
�d�W�	%�#���[�[�]�
�#��O�E�C�
!�E�	
�g��	(��A����
����1/���(�(��:�:�<�D����t�$��A�B�x��"�k�k�#�q�1���e��$�%F�G�G�%)�N�N�3�$7�!���T��W�W�V�T�:�e�3D�A�N�
��U�$'�
�5�!���2�h�G�(,�S�b�	�(;�(;�C�(@�%�Y��W��	�N�E��Q�J�E��"�}��a�i���'�l���#�~��u�S�y�)�)����
���C��)���C���u�S�y�)� �!8�4�!?�@�@�
�'�
'��u�}�,����
���!�!�%��.�c1/�h�W�W�Z�
 �F���k�k�m���
�
�6�=�=��)�*��=�=�?�m�+��G�H�H�	
�d�C�'�	*��a�	�������I#�#�����x��s#�H�H)�H6�H&�)H3�6H?)N)r%r �	ExceptionrrAr	r
r�<module>rCs��,�	�	��	�
Or

Zerion Mini Shell 1.0