Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.52 (Ubuntu)
System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
User : www-data ( 33)
PHP Version : 8.1.2-1ubuntu2.21
Disable Function : NONE
Directory :  /lib/python3/dist-packages/twisted/python/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/twisted/python/__pycache__/systemd.cpython-310.pyc
o

�b��@s@dZdgZddlmZddlmZmZmZmZGdd�d�Z	dS)z�
Integration with systemd.

Currently only the minimum APIs necessary for using systemd's socket activation
feature are supported.
�	ListenFDs�)�getpid)�Iterable�List�Mapping�Optionalc@sleZdZdZdZdeeddfdd�Ze		dde	e
eefd	e	eddfd
d��Zde
efdd
�ZdS)raM
    L{ListenFDs} provides access to file descriptors inherited from systemd.

    Typically L{ListenFDs.fromEnvironment} should be used to construct a new
    instance of L{ListenFDs}.

    @cvar _START: File descriptors inherited from systemd are always
        consecutively numbered, with a fixed lowest "starting" descriptor.  This
        gives the default starting descriptor.  Since this must agree with the
        value systemd is using, it typically should not be overridden.

    @ivar _descriptors: A C{list} of C{int} giving the descriptors which were
        inherited.
    ��descriptors�returnNcCs
||_dS)z
        @param descriptors: The descriptors which will be returned from calls to
            C{inheritedDescriptors}.
        N)�_descriptors)�selfr	�r
�8/usr/lib/python3/dist-packages/twisted/python/systemd.py�__init__%s
zListenFDs.__init__�environ�startc	Cs�|durddlm}|}|dur|j}g}zt|d�}Wnttfy+Y||�Sw|t�krWzt|d�}WnttfyGY||�Swtt|||��}|d=|d=||�S)a�
        @param environ: A dictionary-like object to inspect to discover
            inherited descriptors.  By default, L{None}, indicating that the
            real process environment should be inspected.  The default is
            suitable for typical usage.

        @param start: An integer giving the lowest value of an inherited
            descriptor systemd will give us.  By default, L{None}, indicating
            the known correct (that is, in agreement with systemd) value will be
            used.  The default is suitable for typical usage.

        @return: A new instance of C{cls} which can be used to look up the
            descriptors which have been inherited.
        Nr)r�
LISTEN_PID�
LISTEN_FDS)	�osr�_START�int�KeyError�
ValueErrorr�list�range)�clsrr�_environr	�pid�countr
r
r�fromEnvironment,s,�
�zListenFDs.fromEnvironmentcCs
t|j�S)z6
        @return: The configured descriptors.
        )rr)rr
r
r�inheritedDescriptorsYs
zListenFDs.inheritedDescriptors)NN)�__name__�
__module__�__qualname__�__doc__rrrr�classmethodrr�strrrr r
r
r
rrs����,N)
r$�__all__rr�typingrrrrrr
r
r
r�<module>s


Spamworldpro Mini