<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>

Yf	                 @   sg   d  Z  d d l m Z m Z d d l m Z m Z m Z m Z m	 Z	 m
 Z
 Gd d   d e j  Z d S)z7
Convert use of sys.exitfunc to use the atexit module.
    )pytree
fixer_base)NameAttrCallCommaNewlinesymsc                   sR   e  Z d  Z d Z d Z d Z   f d d   Z   f d d   Z d d   Z   S)	FixExitfuncTa  
              (
                  sys_import=import_name<'import'
                      ('sys'
                      |
                      dotted_as_names< (any ',')* 'sys' (',' any)* >
                      )
                  >
              |
                  expr_stmt<
                      power< 'sys' trailer< '.' 'exitfunc' > >
                  '=' func=any >
              )
              c                s   t  t |   j |   d  S)N)superr
   __init__)selfargs)	__class__ ?/opt/alt/python35/lib64/python3.5/lib2to3/fixes/fix_exitfunc.pyr      s    zFixExitfunc.__init__c                s&   t  t |   j | |  d  |  _ d  S)N)r   r
   
start_tree
sys_import)r   Ztreefilename)r   r   r   r   !   s    zFixExitfunc.start_treec             C   s  d | k r, |  j  d  k r( | d |  _  d  S| d j   } d | _ t j t j t t d  t d    } t	 | | g | j  } | j
 |  |  j  d  k r |  j | d  d  S|  j  j d } | j t j k r| j t    | j t d d   n |  j  j } | j j |  j   } | j }	 t j t j t d	  t d d  g  }
 t j t j |
 g  } | j | d t    | j | d
 |  d  S)Nr   func atexitregisterzKCan't find sys import; Please add an atexit import at the top of your file.    import   )r   Zcloneprefixr   ZNoder	   Zpowerr   r   r   replaceZwarningZchildrentypeZdotted_as_namesZappend_childr   parentindexZimport_nameZsimple_stmtZinsert_childr   )r   ZnodeZresultsr   r   ZcallnamesZcontaining_stmtZpositionZstmt_containerZ
new_importnewr   r   r   	transform%   s2    		zFixExitfunc.transform)	__name__
__module____qualname__Zkeep_line_orderZBM_compatibleZPATTERNr   r   r$   r   r   )r   r   r
      s   r
   N)__doc__Zlib2to3r   r   Zlib2to3.fixer_utilr   r   r   r   r   r	   ZBaseFixr
   r   r   r   r   <module>   s   .