0x1949 Team - FAZEMRX - MANAGER
Edit File: stdio_test_loseconn.cpython-310.pyc
o �b/ � @ s� d Z ddlZddlmZmZ ddlmZ ddlmZm Z G dd� dej �ZedkrXe � ejd ��� e�eejd d�� ddlmZ e� Ze�e� e�� e�ej� dS dS ) z� Main program for the child process run by L{twisted.test.test_stdio.StandardInputOutputTests.test_loseConnection} to test that ITransport.loseConnection() works for process transports. � N)�protocol�stdio)�ConnectionDone)�log�reflectc @ s e Zd ZdZdd� Zdd� ZdS )� LoseConnChildr c C s | j �� d S )N)� transport�loseConnection)�self� r �B/usr/lib/python3/dist-packages/twisted/test/stdio_test_loseconn.py�connectionMade s zLoseConnChild.connectionMadec C s\ z(z|� t� W n ty t�dd� d| _Y nw W t�� dS W t�� dS t�� w )a Check that C{reason} is a L{Failure} wrapping a L{ConnectionDone} instance and stop the reactor. If C{reason} is wrong for some reason, log something about that in C{self.errorLogFile} and make sure the process exits with a non-zero status. Nz,Problem with reason passed to connectionLost� )�trapr � BaseExceptionr �err�exitCode�reactor�stop)r �reasonr r r �connectionLost s ���zLoseConnChild.connectionLostN)�__name__� __module__�__qualname__r r r r r r r r s r �__main__r � �wb)r )�__doc__�sys�twisted.internetr r �twisted.internet.errorr �twisted.pythonr r �Protocolr r �namedAny�argv�install�startLogging�openr �protocolLoseConnChild� StandardIO�run�exitr r r r r �<module> s �