OwlCyberSecurity - MANAGER
Edit File: fix_exitfunc.cpython-36.opt-1.pyc
3 � \� ������������������@���sJ���d�Z�ddlmZmZ�ddlmZmZmZmZm Z m Z �G�dd��dej�ZdS�)z7 Convert use of sys.exitfunc to use the atexit module. �����)�pytree� fixer_base)�Name�Attr�Call�Comma�Newline�symsc�������������������s<���e�Zd�ZdZdZdZ��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 > ) c����������������s���t�t|��j|���d�S�)N)�superr ����__init__)�self�args)� __class__���2/usr/lib64/python3.6/lib2to3/fixes/fix_exitfunc.pyr������s����zFixExitfunc.__init__c����������������s���t�t|��j||��d�|�_d�S�)N)r���r ���� start_tree� sys_import)r ���Ztree�filename)r���r���r���r���!���s����zFixExitfunc.start_treec�������������C���s&��d|kr |�j�d�kr|d�|�_�d�S�|d�j��}d|_tjtjttd�td���}t ||g|j�}|j |��|�j�d�kr�|�j|d��d�S�|�j�jd�}|j tjkr�|jt����|jtdd���nj|�j�j}|jj|�j��}|j} tjtjtd �tdd�g�} tjtj| 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���Zclone�prefixr���ZNoder ���Zpowerr���r���r����replaceZwarningZchildren�typeZdotted_as_namesZappend_childr����parent�indexZimport_nameZsimple_stmtZinsert_childr���)r ���ZnodeZresultsr���r���Zcall�namesZcontaining_stmtZpositionZstmt_containerZ new_import�newr���r���r���� transform%���s2���� zFixExitfunc.transform) �__name__� __module__�__qualname__Zkeep_line_orderZ BM_compatibleZPATTERNr���r���r$���� __classcell__r���r���)r���r���r ������s���r ���N) �__doc__Zlib2to3r���r���Zlib2to3.fixer_utilr���r���r���r���r���r ���ZBaseFixr ���r���r���r���r����<module>���s���