HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/twisted/test/__pycache__/stdio_test_loseconn.cpython-310.pyc
o

�b/�@s�dZddlZddlmZmZddlmZddlmZm	Z	Gdd�dej
�ZedkrXe	�
ejd	���e�eejd
d��ddlmZe�Ze�e�e��e�ej�dSdS)
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 eZdZdZdd�Zdd�ZdS)�
LoseConnChildrcCs|j��dS)N)�	transport�loseConnection)�self�r�B/usr/lib/python3/dist-packages/twisted/test/stdio_test_loseconn.py�connectionMadeszLoseConnChild.connectionMadecCs\z(z|�t�Wntyt�dd�d|_YnwWt��dSWt��dSt��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
�reasonrrr�connectionLosts
���zLoseConnChild.connectionLostN)�__name__�
__module__�__qualname__rr
rrrrrrsr�__main__r��wb)r)�__doc__�sys�twisted.internetrr�twisted.internet.errorr�twisted.pythonrr�Protocolrr�namedAny�argv�install�startLogging�openr�protocolLoseConnChild�
StandardIO�run�exitrrrrr�<module>s
�