Sh3ll
OdayForums


Server : Apache
System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User : nobody ( 99)
PHP Version : 8.1.23
Disable Function : NONE
Directory :  /opt/alt/python38/lib64/python3.8/lib2to3/fixes/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python38/lib64/python3.8/lib2to3/fixes/__pycache__/fix_exitfunc.cpython-38.pyc
U

��,a�	�@sJdZddlmZmZddlmZmZmZmZm	Z	m
Z
Gdd�dej�ZdS)z7
Convert use of sys.exitfunc to use the atexit module.
�)�pytree�
fixer_base)�Name�Attr�Call�Comma�Newline�symscs<eZdZdZdZdZ�fdd�Z�fdd�Zdd�Z�Z	S)	�FixExitfuncTa�
              (
                  sys_import=import_name<'import'
                      ('sys'
                      |
                      dotted_as_names< (any ',')* 'sys' (',' any)* >
                      )
                  >
              |
                  expr_stmt<
                      power< 'sys' trailer< '.' 'exitfunc' > >
                  '=' func=any >
              )
              cstt|�j|�dS�N)�superr
�__init__)�self�args��	__class__��?/opt/alt/python38/lib64/python3.8/lib2to3/fixes/fix_exitfunc.pyr
szFixExitfunc.__init__cstt|��||�d|_dSr)rr
�
start_tree�
sys_import)rZtree�filenamerrrr!szFixExitfunc.start_treecCs&d|kr |jdkr|d|_dS|d��}d|_t�tjttd�td���}t	||g|j�}|�
|�|jdkr�|�|d�dS|jjd}|j
tjkr�|�t��|�tdd��nj|jj}|j�|j�}|j}	t�tjtd	�tdd�g�}
t�tj|
g�}|�|dt��|�|d
|�dS)Nr�func��atexit�registerzKCan't find sys import; Please add an atexit import at the top of your file.�� �import�)rZclone�prefixrZNoder	Zpowerrrr�replaceZwarningZchildren�typeZdotted_as_namesZappend_childr�parent�indexZimport_nameZsimple_stmtZinsert_childr)rZnodeZresultsrrZcall�namesZcontaining_stmtZpositionZstmt_containerZ
new_import�newrrr�	transform%s6

�

�zFixExitfunc.transform)
�__name__�
__module__�__qualname__Zkeep_line_orderZ
BM_compatibleZPATTERNr
rr&�
__classcell__rrrrr
sr
N)
�__doc__Zlib2to3rrZlib2to3.fixer_utilrrrrrr	ZBaseFixr
rrrr�<module>s 

ZeroDay Forums Mini