HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/zmq/__pycache__/error.cpython-310.pyc
o

�N�g�	@s�dZddlmZddlmZmZmZGdd�de�ZGdd�de�Z	Gdd	�d	e�Z
Gd
d�de�ZGdd
�d
e	�ZGdd�de	�Z
Gdd�de	e�Zddd�ZdadaGdd�de�Z	ddeeeeeefeeeeffdefdd�Zgd�ZdS) z 0MQ Error classes and functions.�)�EINTR)�Optional�Tuple�Unionc@�eZdZdZdS)�ZMQBaseErrorz.Base exception class for 0MQ errors in Python.N��__name__�
__module__�__qualname__�__doc__�r
r
�=/opt/saltstack/salt/lib/python3.10/site-packages/zmq/error.pyr
�rc@sZeZdZUdZdZeeed<ddeedeefdd�Z	defdd	�Z
defd
d�ZdS)
�ZMQErrorz�Wrap an errno style error.

    Parameters
    ----------
    errno : int
        The ZMQ errno or None.  If None, then ``zmq_errno()`` is called and
        used.
    msg : string
        Description of the error or None.
    N�errno�msgcCsnddlm}m}|dur|�}t|t�r'||_|dur"||�|_dS||_dS|dur2t|�|_dS||_dS)aWrap an errno style error.

        Parameters
        ----------
        errno : int
            The ZMQ errno or None.  If None, then ``zmq_errno()`` is called and
            used.
        msg : string
            Description of the error or None.
        r)�strerror�	zmq_errnoN)�zmq.backendrr�
isinstance�intr�str)�selfrrrrr
r
r�__init__s


zZMQError.__init__�returncCs|jS�N)r�rr
r
r�__str__<szZMQError.__str__cCs|jj�dt|��d�S)Nz('z'))�	__class__r	rrr
r
r�__repr__?szZMQError.__repr__)NN)r	r
rrrrr�__annotations__rrrr r
r
r
rrs
 rc@r)�ZMQBindErrorznAn error for ``Socket.bind_to_random_port()``.

    See Also
    --------
    .Socket.bind_to_random_port
    Nrr
r
r
rr"Crr"c@r)�NotDonez�Raised when timeout is reached while waiting for 0MQ to finish with a Message

    See Also
    --------
    .MessageTracker.wait : object for tracking when ZeroMQ is done
    Nrr
r
r
rr#Lrr#c�"eZdZdZd�fdd�	Z�ZS)�ContextTerminatedz6Wrapper for zmq.ETERM

    .. versionadded:: 13.0
    �ignoredc�ddlm}t��|�dS)Nr)�ETERM)�zmqr(�superr)rrrr(�rr
rr[�zContextTerminated.__init__�r&r&�r	r
rrr�
__classcell__r
r
r+rr%U�r%cr$)�Againz7Wrapper for zmq.EAGAIN

    .. versionadded:: 13.0
    r&cr')Nr)�EAGAIN)r)r2r*r)rrrr2r+r
rrgr,zAgain.__init__r-r.r
r
r+rr1ar0r1cs2eZdZdZeZd�fdd�	Z�fdd�Z�ZS)�InterruptedSystemCallz�Wrapper for EINTR

    This exception should be caught internally in pyzmq
    to retry system calls, and not propagate to the user.

    .. versionadded:: 14.7
    r&cst��t�dSr)r*rr)rrrr+r
rrxszInterruptedSystemCall.__init__cst���}|dS)NzB: This call should have been retried. Please report this to pyzmq.)r*r)r�sr+r
rr{s
zInterruptedSystemCall.__str__r-)	r	r
rrrrrrr/r
r
r+rr3ms
r3NTcCs~|dkr=|durddlm}|�}|dkr|sdSddlm}m}|tkr)t|��||kr1t|��||kr9t|��t	|��dS)zhinternal utility for checking zmq return condition

    and raising the appropriate Exception class
    ���Nr)r)r2r()
rrr)r2r(rr3r1r%r)�rcrZerror_without_errnorr2r(r
r
r�	_check_rc�s�r7c@s8eZdZdZdZddedefdd�Zdd	�Zd
d�ZdS)
�ZMQVersionErrorzgRaised when a feature is not provided by the linked version of libzmq.

    .. versionadded:: 14.2
    N�Feature�min_versionrcCs0tdur
ddlm}|�a||_||_t|_dS)Nr)�zmq_version)�_zmq_versionr)r;rr:�version)rr:rr;r
r
rr�s
zZMQVersionError.__init__cCsdt|�S)NzZMQVersionError('%s')�rrr
r
rr �szZMQVersionError.__repr__cCsd�|j|j|j�S)Nz!{} requires libzmq >= {}, have {})�formatrr:r=rr
r
rr�s
�zZMQVersionError.__str__�r9)	r	r
rrr:rrr rr
r
r
rr8�s
r8r9�min_version_inforcCsDtdur
ddlm}|�at|kr d�dd�|D��}t||��dS)z�Check for libzmq

    raises ZMQVersionError if current zmq version is not at least min_version

    min_version_info is a tuple of integers, and will be compared against zmq.zmq_version_info().
    Nr)�zmq_version_info�.css�|]}t|�VqdSrr>)�.0�vr
r
r�	<genexpr>�s�z!_check_version.<locals>.<genexpr>)�_zmq_version_infor)rB�joinr8)rArrBr:r
r
r�_check_version�s
�rI)rr"rr#r%r3r1r8)NTr@)rrr�typingrrr�	Exceptionrrr"r#r%r1�InterruptedErrorr3r7rGr<�NotImplementedErrorr8rrrI�__all__r
r
r
r�<module>s*5		
�"�
�