HEX
Server: nginx/1.30.4
System: Linux d-twindigital-web-1.host-ed.eu 4.18.0-553.141.2.el8_10.x86_64 #1 SMP Wed Jul 8 10:28:18 EDT 2026 x86_64
User: u_twindigital_html (1009)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: //lib/python3.6/site-packages/fail2ban/server/__pycache__/jailthread.cpython-36.pyc
3

=�Z]��@sXdZdZdZddlZddlmZddlmZddlm	Z	d	d
l
mZGdd�de�ZdS)
z
Cyril Jaquierz Copyright (c) 2004 Cyril JaquierZGPL�N)�Thread)�abstractmethod�)�Utils�)�
excepthookcs\eZdZdZd�fdd�	Zeddd��Z�fdd	�Zd
d�Zedd
��Z	�fdd�Z
�ZS)�
JailThreadaAbstract class for threading elements in Fail2Ban.

	Attributes
	----------
	daemon
	ident
	name
	status
	active : bool
		Control the state of the thread.
	idle : bool
		Control the idle state of the thread.
	sleeptime : int
		The time the thread sleeps for in the loop.
	NcsHtt|�j|d�d|_d|_d|_tj|_|j	��fdd�}||_	dS)N)�nameTFcsTy�||�Wn@tk
rN}z$tdk	r6ttj��nt|�WYdd}~XnXdS)N)�	Exception�sysr�exc_info�print)�args�kwargs�e)�run�� /usr/lib/python3.6/jailthread.py�run_with_except_hookCsz1JailThread.__init__.<locals>.run_with_except_hook)
�superr�__init__Zdaemon�activeZidlerZDEFAULT_SLEEP_TIMEZ	sleeptimer)�selfr	r)�	__class__)rrr4s
zJailThread.__init__�basiccCsdS)z0Abstract - Should provide status information.
		Nr)rZflavorrrr�statusOszJailThread.statuscsd|_tt|�j�dS)z&Sets active flag and starts thread.
		TN)rrr�start)r)rrrrUszJailThread.startcCs
d|_dS)zASets `active` property to False, to flag run method to return.
		FN)r)rrrr�stop[szJailThread.stopcCsdS)zCAbstract - Called when thread starts, thread stops when returns.
		Nr)rrrrr`szJailThread.runcs|jdk	rtt|�j�dS)z` Safer join, that could be called also for not started (or ended) threads (used for cleanup).
		N)rrr�join)r)rrrrfs
zJailThread.join)N)r)�__name__�
__module__�__qualname__�__doc__rrrrrrr�
__classcell__rr)rrr#sr)
�
__author__Z
__copyright__Z__license__rZ	threadingr�abcrZutilsrZhelpersrrrrrr�<module>s