%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/fail2ban/server/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/fail2ban/server/jails.pyc

�
��&dc@srdZdZdZddlmZddlmZddlmZm	Z	dd	l
mZd
efd��YZdS(
s!Cyril Jaquier, Yaroslav Halchenkos:Copyright (c) 2004 Cyril Jaquier, 2013- Yaroslav HalchenkotGPLi����(tLock(tMappingi(tDuplicateJailExceptiontUnknownJailExceptioni(tJailtJailscBsPeZdZd�Zdd�Zd�Zd�Zd�Zd�Z	d�Z
RS(	sBHandles the jails.

	This class handles the jails. Creation, deletion or access to a jail
	must be done through this class. This class is thread-safe which is
	not the case of the jail itself, including filter and actions. This
	class is based on Mapping type, and the `add` method must be used to
	add additional jails.
	cCst�|_t�|_dS(N(Rt_Jails__locktdictt_jails(tself((s9/usr/lib/python2.7/site-packages/fail2ban/server/jails.pyt__init__)scCsT|j�E||jkr1trJt|��qJnt|||�|j|<WdQXdS(sUAdds a jail.

		Adds a new jail if not already present which should use the
		given backend.

		Parameters
		----------
		name : str
			The name of the jail.
		backend : str
			The backend to use.
		db : Fail2BanDb
			Fail2Ban's persistent database instance.

		Raises
		------
		DuplicateJailException
			If jail name is already present.
		N(RR	tnoduplicatesRR(R
tnametbackendtdb((s9/usr/lib/python2.7/site-packages/fail2ban/server/jails.pytadd-s

cCs
||jkS(N(R	(R
R
((s9/usr/lib/python2.7/site-packages/fail2ban/server/jails.pytexistsHscCsUz@y|jj�|j|SWntk
r>t|��nXWd|jj�XdS(N(RtacquireR	tKeyErrorRtrelease(R
R
((s9/usr/lib/python2.7/site-packages/fail2ban/server/jails.pyt__getitem__Ks

cCsTz?y|jj�|j|=Wntk
r=t|��nXWd|jj�XdS(N(RRR	RRR(R
R
((s9/usr/lib/python2.7/site-packages/fail2ban/server/jails.pyt__delitem__Ts

cCs3z|jj�t|j�SWd|jj�XdS(N(RRtlenR	R(R
((s9/usr/lib/python2.7/site-packages/fail2ban/server/jails.pyt__len__]s
cCs3z|jj�t|j�SWd|jj�XdS(N(RRtiterR	R(R
((s9/usr/lib/python2.7/site-packages/fail2ban/server/jails.pyt__iter__ds
N(t__name__t
__module__t__doc__RtNoneRRRRRR(((s9/usr/lib/python2.7/site-packages/fail2ban/server/jails.pyRs							N(
t
__author__t
__copyright__t__license__t	threadingRtcollectionsRt
exceptionsRRtjailRR(((s9/usr/lib/python2.7/site-packages/fail2ban/server/jails.pyt<module>s

Zerion Mini Shell 1.0