| Server IP : 209.205.66.10 / Your IP : 216.73.217.150 Web Server : Apache/2.4.52 (Ubuntu) System : Linux ammon 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64 User : ( 1006) PHP Version : 8.5.8 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/twisted/test/__pycache__/ |
Upload File : |
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
�