HEX
Server: Apache
System: Linux shared178.accountservergroup.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User: somesolu (2995)
PHP: 8.2.33
Disabled: NONE
Upload Files
File: //lib/python2.7/site-packages/pyzor/engines/common.pyc
�
YF�Tc@s�dZddlZddlZddlmZddddgZeddd	d
dg�Zdefd��YZde	fd
��YZ
de	fd��YZdS(s+Common library shared by different engines.i����N(t
namedtupletDBHandlet
DatabaseErrortRecordt
BaseEnginetsingle_threadedtmulti_threadedtmulti_processingtpreforkcBseZRS((t__name__t
__module__(((s8/usr/lib/python2.7/site-packages/pyzor/engines/common.pyRscBsMeZdZddddddd�Zd�Zd�Zd�Zd�ZRS(sTPrefix conventions used in this class:
    r = report (spam)
    wl = whitelist
    icCs:||_||_||_||_||_||_dS(N(tr_counttwl_countt	r_enteredt	r_updatedt
wl_enteredt
wl_updated(tselfRRR
RRR((s8/usr/lib/python2.7/site-packages/pyzor/engines/common.pyt__init__s					cCsV|jtjkr$|jd7_n|jdkrHtjj�|_n|j�dS(Ni(RtsystmaxintRtNonetdatetimetnowt	wl_update(R((s8/usr/lib/python2.7/site-packages/pyzor/engines/common.pytwl_increment s
cCsV|jtjkr$|jd7_n|jdkrHtjj�|_n|j�dS(Ni(RRRR
RRRtr_update(R((s8/usr/lib/python2.7/site-packages/pyzor/engines/common.pytr_increment(s
cCstjj�|_dS(N(RRR(R((s8/usr/lib/python2.7/site-packages/pyzor/engines/common.pyR0scCstjj�|_dS(N(RRR(R((s8/usr/lib/python2.7/site-packages/pyzor/engines/common.pyR3sN(	R	R
t__doc__RRRRRR(((s8/usr/lib/python2.7/site-packages/pyzor/engines/common.pyRs				cBsteZdZeZeZd�Zd�Zd�Z	d�Z
d�Zd�Zd�Z
d�Zed
d	��ZRS(sBase class for Pyzor engines.cCs
t��dS(sIterate over all keysN(tNotImplementedError(R((s8/usr/lib/python2.7/site-packages/pyzor/engines/common.pyt__iter__<scCs
t��dS(s$Iterate over pairs of (key, record).N(R(R((s8/usr/lib/python2.7/site-packages/pyzor/engines/common.pyt	iteritems@scCs
t��dS(sReturn a list of (key, record).N(R(R((s8/usr/lib/python2.7/site-packages/pyzor/engines/common.pytitemsDscCs
t��dS(s*Get the record for this corresponding key.N(R(Rtkey((s8/usr/lib/python2.7/site-packages/pyzor/engines/common.pyt__getitem__HscCs
t��dS(sqSet the record for this corresponding key. 'value' should be a
        instance of the ``Record`` class.
        N(R(RR!tvalue((s8/usr/lib/python2.7/site-packages/pyzor/engines/common.pyt__setitem__LscCs
t��dS(s2Remove the corresponding record from the database.N(R(RR!((s8/usr/lib/python2.7/site-packages/pyzor/engines/common.pyt__delitem__RscCs
t��dS(s�Report the corresponding key as spam, incrementing the report count.

        Engines that implement don't implement this method should have
        handles_one_step set to False.
        N(R(Rtkeys((s8/usr/lib/python2.7/site-packages/pyzor/engines/common.pytreportVscCs
t��dS(s�Report the corresponding key as ham, incrementing the whitelist
        count.

        Engines that implement don't implement this method should have
        handles_one_step set to False.
        N(R(RR&((s8/usr/lib/python2.7/site-packages/pyzor/engines/common.pyt	whitelist^scCs
t��dS(s�Yields an unlimited number of partial functions that return a new
        engine instance, suitable for using toghether with the Pre-Fork server.
        N(R(tclstfntmodetmax_age((s8/usr/lib/python2.7/site-packages/pyzor/engines/common.pytget_prefork_connectionshsN(R	R
RtTruetabsolute_sourcetFalsethandles_one_stepRRR R"R$R%R'R(tclassmethodRR-(((s8/usr/lib/python2.7/site-packages/pyzor/engines/common.pyR7s								
(RRRtcollectionsRt__all__Rt	ExceptionRtobjectRR(((s8/usr/lib/python2.7/site-packages/pyzor/engines/common.pyt<module>s%