• File: fix_exitfunc.cpython-37.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python37/lib64/python3.7/lib2to3/fixes/__pycache__/fix_exitfunc.cpython-37.pyc
  • Date Modified: 10/26/2026 8:08 PM
  • File size: 2.24 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

Rj	@sJdZddlmZmZddlmZmZmZmZm	Z	m
Z
GdddejZdS)z7
Convert use of sys.exitfunc to use the atexit module.
)pytree
fixer_base)NameAttrCallCommaNewlinesymscs<eZdZdZdZdZfddZfddZddZZ	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__)selfargs)	__class__?/opt/alt/python37/lib64/python3.7/lib2to3/fixes/fix_exitfunc.pyrszFixExitfunc.__init__cstt|||d|_dS)N)rr

start_tree
sys_import)r
Ztreefilename)rrrr!szFixExitfunc.start_treecCs&d|kr |jdkr|d|_dS|d}d|_ttjttdtd}t	||g|j}|
||jdkr||ddS|jjd}|j
tjkr|t|tddnj|jj}|j|j}|j}	ttjtd	tddg}
ttj|
g}||dt||d
|dS)NrfuncatexitregisterzKCan't find sys import; Please add an atexit import at the top of your file. import)rZcloneprefixrZNoder	ZpowerrrrreplaceZwarningZchildrentypeZdotted_as_namesZappend_childrparentindexZimport_nameZsimple_stmtZinsert_childr)r
ZnodeZresultsrrZcallnamesZcontaining_stmtZpositionZstmt_containerZ
new_importnewrrr	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