HEX
Server: nginx/1.24.0
System: Linux localhost 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64
User: www (1000)
PHP: 8.3.27
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: //lib/python3/dist-packages/DistUpgrade/__pycache__/DistUpgradePatcher.cpython-310.pyc
o

>I�c��@s.ddlZddlZGdd�de�Zddd�ZdS)�Nc@seZdZdZdS)�
PatchErrorz  Error during the patch process N)�__name__�
__module__�__qualname__�__doc__�rr�@/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradePatcher.pyrsrcCs<td�\}}t|dd��}|��}Wd�n1swYd}}|}	t|dd��}|��}
Wd�n1s;wY|
D]�}|	|kr�|��}|�d�r|dd�}|�dd�\}}
|
retd	��|�d�\}}}tj	||||dd
�\}}|||<qB|d}|dd��d�\}}}t
|�}|d8}|d
kr�|d}nt
|�}|dkr�|||�=|}	|d8}qB|dkr�|}	qB|dkr�|||�=qBtd|��|	|kr�|dkr�|}	qB|d7}|�||�qBd
�|�}|r�t
��}|�|�d��|��|kr�td��t|ddd��}|�|�Wd�dS1�swYdS)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"rrr�patchsr�
�
�



�

��r=)N)r!r�	Exceptionrr=rrrr�<module>s