HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/__pycache__/exceptions.cpython-310.pyc
o

�N�g�<�@s�dZddlZddlZddlZddlZe�e�Zdd�Z	dd�Z
Gdd�de�ZGd	d
�d
e�Z
Gdd�de�ZGd
d�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd �d e�ZGd!d"�d"e�ZGd#d$�d$e�ZGd%d&�d&e�ZGd'd(�d(e�ZGd)d*�d*e�ZGd+d,�d,ee�Z Gd-d.�d.e�Z!Gd/d0�d0e�Z"Gd1d2�d2e�Z#Gd3d4�d4e�Z$Gd5d6�d6e�Z%Gd7d8�d8e�Z&Gd9d:�d:e�Z'Gd;d<�d<e�Z(Gd=d>�d>e�Z)Gd?d@�d@e�Z*GdAdB�dBe�Z+GdCdD�dDe�Z,GdEdF�dFe�Z-GdGdH�dHe�Z.GdIdJ�dJe�Z/GdKdL�dLe�Z0GdMdN�dNe�Z1GdOdP�dPe�Z2GdQdR�dRe2�Z3GdSdT�dTe2�Z4GdUdV�dVe2�Z5GdWdX�dXe2�Z6GdYdZ�dZe2�Z7Gd[d\�d\e2�Z8Gd]d^�d^e�Z9Gd_d`�d`e�Z:Gdadb�dbe�Z;Gdcdd�dde�Z<Gdedf�dfe�Z=Gdgdh�dhe�Z>Gdidj�dje�Z?Gdkdl�dle?�Z@Gdmdn�dne?�ZAGdodp�dpe?�ZBGdqdr�dre?�ZCGdsdt�dte?�ZDGdudv�dveB�ZEGdwdx�dxe?�ZFGdydz�dze?�ZGGd{d|�d|eG�ZHGd}d~�d~e?�ZIGdd��d�e?�ZJGd�d��d�e?�ZKGd�d��d�e?�ZLGd�d��d�e�ZMGd�d��d�eN�ZOGd�d��d�e�ZPGd�d��d�eP�ZQGd�d��d�eP�ZRGd�d��d�eP�ZSGd�d��d�e�ZTdS)�z;
This module is a central location for all salt exceptions
�NcCs$ddlm}i|_|�|���}|S)z-
    Serialize obj and format for output
    r)�nested)Zsalt.outputrZ__opts__�output�rstrip)�objr�ret�r�C/opt/saltstack/salt/lib/python3.10/site-packages/salt/exceptions.py�_nested_outputsr	cCs|jr|jdSdS)z:
    Get human readable message from Python Exception
    r�)�args)�errorrrr�get_error_messagesr
cs*eZdZdZd�fdd�	Zdd�Z�ZS)�
SaltExceptionzQ
    Base exception class; all Salt-specific exceptions should subclass this
    r
cs@ddl}t|t�s
t|�}t��|jj�|��||_|_	dS)Nr)
�salt.utils.stringutils�
isinstance�str�super�__init__�utils�stringutilsZto_str�message�strerror)�selfr�salt��	__class__rrr&s

zSaltException.__init__cCst|�|jd�S)zs
        Pack this exception into a serializable dictionary that is safe for
        transport via msgpack
        )rr)rr)rrrr�pack/szSaltException.pack)r
)�__name__�
__module__�__qualname__�__doc__rr�
__classcell__rrrrr!s	rc@�eZdZdZdS)�SaltClientError�-
    Problem reading the master root key
    N�rrrr rrrrr#7�r#c@r")�SaltMasterErrorr$Nr%rrrrr'=r&r'c@r")�SaltNoMinionsFoundz9
    An attempt to retrieve a list of minions failed
    Nr%rrrrr(Cr&r(c@r")�SaltSyndicMasterErrorzD
    Problem while proxying a request in the syndication master
    Nr%rrrrr)Ir&r)c@r")�SaltMasterUnresolvableErrorz7
    Problem resolving the name of the Salt master
    Nr%rrrrr*Or&r*c@r")�
MasterExitz$
    Rise when the master exits
    Nr%rrrrr+Ur&r+c@r")�AuthenticationErrorz5
    If sha256 signature fails during decryption
    Nr%rrrrr,[r&r,c@r")�InvalidKeyErrorz6
    Raised when we encounter an invalid RSA key.
    Nr%rrrrr-ar&r-c@r")�CommandNotFoundErrorzK
    Used in modules or grains when a required binary is not available
    Nr%rrrrr.gr&r.cs"eZdZdZd�fdd�	Z�ZS)�CommandExecutionError��
    Used when a module runs a command which returns an error and wants
    to show the user the output gracefully instead of dying
    r
Ncsddl}z	|jj�|�}Wn"ty/zt|�}Wnty,|jj�t|��}YnwYnw||_||_|jry|rI|ddvrE|d7}|d7}|d7}|t	|j�}t
|jt�rut�
|j�}|�dd�|rp|t	|�|_n|j|_n
||_n|j|_}t��|�dS)Nr���z.?!�.� zAdditional info follows:

Zchanges)rrr�
to_unicode�	TypeErrorr�UnicodeDecodeErrorr�infor	r�dict�copy�deepcopy�popZstrerror_without_changesrr)rrr7rZexc_str_prefix�exc_strZinfo_without_changesrrrrss>���

�
zCommandExecutionError.__init__)r
N�rrrr rr!rrrrr/msr/c@r")�LoaderErrorz-
    Problems loading the right renderer
    Nr%rrrrr>�r&r>c@r")�PublishErrorz?
    Problems encountered when trying to publish a command
    Nr%rrrrr?�r&r?c@r")�MinionErrorzA
    Minion problems reading uris such as salt:// or http://
    Nr%rrrrr@�r&r@c@r")�FileserverConfigErrorz<
    Used when invalid fileserver settings are detected
    Nr%rrrrrA�r&rAc�$eZdZdZ	d�fdd�	Z�ZS)�
FileLockErrorz9
    Used when an error occurs obtaining a file lock
    NcsDt�j|g|�Ri|��|durt�d�t��|_dS||_dS)Nz�time_start should be provided when raising a FileLockError. Defaulting to current time as a fallback, but this may result in an inaccurate timeout.)rr�log�warning�time�
time_start)rrrGr�kwargsrrrr�s�
zFileLockError.__init__�Nr=rrrrrC�s�rCcs eZdZdZ�fdd�Z�ZS)�GitLockErrorax
    Raised when an uncaught error occurs in the midst of obtaining an
    update/checkout lock in salt.utils.gitfs.

    NOTE: While this uses the errno param similar to an OSError, this exception
    class is *not* as subclass of OSError. This is done intentionally, so that
    this exception class can be caught in a try/except without being caught as
    an OSError.
    cs$t�j|g|�Ri|��||_dSrI)rr�errno)rrKrrrHrrrr�s
zGitLockError.__init__r=rrrrrJ�s
rJc@r")�GitRemoteErrorzv
    Used by GitFS to denote a problem with the existence of the "origin" remote
    or part of its configuration
    Nr%rrrrrL�r&rLc@r")�SaltInvocationErrorz�
    Used when the wrong number of arguments are sent to modules or invalid
    arguments are specified on the command line
    Nr%rrrrrM�r&rMc@r")�
PkgParseErrorz�
    Used when of the pkg modules cannot correctly parse the output from
    the CLI tool (pacman, yum, apt, aptitude, etc)
    Nr%rrrrrN�r&rNcs*eZdZdZ				d�fdd�	Z�ZS)�SaltRenderErrorz�
    Used when a renderer needs to raise an explicit error. If a line number and
    buffer string are passed, get_context will be invoked to get the location
    of the error.
    Nr
�    <======================cs�ddl}||_z	|jj�|�}Wn"ty2zt|�}Wnty/|jj�t|��}YnwYnw||_||_	d|_
|rF|d|�d�7}|jrl|j	rlddl}|jjj|j	|j|d�|_
|d�
|j|jj�|j
��7}t��|�dS)Nrr
�
)�markerz
; line {}

{})rrrrr4r5rr6�line_num�buffer�contextZsalt.utils.templatesZget_context�formatrr)rrrS�bufrRZtracerr<rrrrs6	���

��zSaltRenderError.__init__)Nr
rPNr=rrrrrO�s	�rOcrB)�SaltClientTimeoutzu
    Thrown when a job sent through one of the Client interfaces times out

    Takes the ``jid`` as a parameter
    Ncs$t�j|g|�Ri|��||_dSrI)rr�jid)rrrYrrHrrrr5s
zSaltClientTimeout.__init__rIr=rrrrrX.s�rXc@r")�SaltCacheErrorz[
    Thrown when a problem was encountered trying to read or write from the salt cache
    Nr%rrrrrZ<r&rZc@r")�TimeoutErrorzP
    Thrown when an opration cannot be completet within a given time limit.
    Nr%rrrrr[Br&r[c@r")�SaltReqTimeoutErrorzS
    Thrown when a salt master request call fails to return within the timeout
    Nr%rrrrr\Hr&r\c@r")�TimedProcTimeoutErrorz�
    Thrown when a timed subprocess does not terminate within the timeout,
    or if the specified timeout is not an int or a float
    Nr%rrrrr]Nr&r]c@r")�EauthAuthenticationErrorz0
    Thrown when eauth authentication fails
    Nr%rrrrr^Ur&r^c@r")�TokenAuthenticationErrorz0
    Thrown when token authentication fails
    Nr%rrrrr_[r&r_c@r")�SaltDeserializationErrorz3
    Thrown when salt cannot deserialize data.
    Nr%rrrrr`ar&r`c@r")�AuthorizationErrorzH
    Thrown when runner or wheel execution fails due to permissions
    Nr%rrrrragr&rac@r")�UnsupportedAlgorithmzR
    Thrown when a requested encryption or signing algorithm is un-supported.
    Nr%rrrrrbmr&rbc@r")�SaltDaemonNotRunningz�
    Throw when a running master/minion/syndic is not running but is needed to
    perform the requested operation (e.g., eauth).
    Nr%rrrrrcsr&rcc@r")�SaltRunnerErrorz
    Problem in runner
    Nr%rrrrrdzr&rdc@r")�SaltWheelErrorz
    Problem in wheel
    Nr%rrrrre�r&rec@r")�SaltConfigurationErrorz
    Configuration error
    Nr%rrrrrf�r&rfc@seZdZdZddd�ZdS)�SaltSystemExitz~
    This exception is raised when an unsolvable problem is found. There's
    nothing else to do, salt should just exit.
    rNcCst�||�dSrI)�
SystemExitr)r�code�msgrrrr�szSaltSystemExit.__init__)rN)rrrr rrrrrrg�srgc@r")�SaltCloudExceptionz&
    Generic Salt Cloud Exception
    Nr%rrrrrk�r&rkcs*eZdZdZejjjf�fdd�	Z�Z	S)�SaltCloudSystemExitzH
    This exception is raised when the execution should be stopped.
    cst��|�||_||_dSrI)rrr�	exit_code)rrrmrrrr�s
zSaltCloudSystemExit.__init__)
rrrr r�defaultsZ	exitcodesZ
EX_GENERICrr!rrrrrl�srlc@r")�SaltCloudConfigErrorzL
    Raised when a configuration setting is not found and should exist.
    Nr%rrrrro�r&roc@r")�SaltCloudNotFoundzU
    Raised when some cloud provider function cannot find what's being searched.
    Nr%rrrrrp�r&rpc@r")�SaltCloudExecutionTimeoutzO
    Raised when too much time has passed while querying/waiting for data.
    Nr%rrrrrq�r&rqc@r")�SaltCloudExecutionFailurezV
    Raised when too much failures have occurred while querying/waiting for data.
    Nr%rrrrrr�r&rrc@r")�SaltCloudPasswordErrorz;
    Raise when virtual terminal password input failed
    Nr%rrrrrs�r&rsc@r")�NotImplementedr0Nr%rrrrrt�r&rtc@r")�
TemplateErrorz=
    Used when a custom error is triggered in a template
    Nr%rrrrru�r&ruc@r")�ArgumentValueErrorzI
    Used when an invalid argument was passed to a command execution
    Nr%rrrrrv�r&rvc@r")�
CheckErrorz!
    Used when a check fails
    Nr%rrrrrw�r&rwc@r")�InvalidConfigErrorz)
    Used when the config is invalid
    Nr%rrrrrx�r&rxc@r")�InvalidEntityErrorz.
    Used when an entity fails validation
    Nr%rrrrry�r&ryc@r")�VMwareSaltError�7
    Used when a VMware object cannot be retrieved
    Nr%rrrrrz�r&rzc@r")�VMwareRuntimeErrorzZ
    Used when a runtime error is encountered when communicating with the
    vCenter
    Nr%rrrrr|�r&r|c@r")�VMwareConnectionErrorzi
    Used when the client fails to connect to a either a VMware vCenter server or
    to a ESXi host
    Nr%rrrrr}�r&r}c@r")�VMwareObjectRetrievalErrorr{Nr%rrrrr~r&r~c@r")�VMwareObjectNotFoundError�1
    Used when a VMware object was not found
    Nr%rrrrrr&rc@r")�VMwareObjectExistsErrorz2
    Used when a VMware object already exists
    Nr%rrrrr�r&r�c@r")�VMwareMultipleObjectsErrorzJ
    Used when multiple objects were retrieved (and one was expected)
    Nr%rrrrr�r&r�c@r")�VMwareNotFoundErrorr�Nr%rrrrr�r&r�c@r")�VMwareApiErrorz;
    Used when representing a generic VMware API error
    Nr%rrrrr�r&r�c@r")�VMwareFileNotFoundErrorzK
    Used when representing a generic VMware error if a file not found
    Nr%rrrrr�$r&r�c@r")�VMwareSystemErrorz>
    Used when representing a generic VMware system error
    Nr%rrrrr�*r&r�c@r")�VMwarePowerOnErrorz2
    Used when error occurred during power on
    Nr%rrrrr�0r&r�c@r")�VMwareVmRegisterError�:
    Used when a configuration parameter is incorrect
    Nr%rrrrr�6r&r�c@r")�VMwareVmCreationErrorr�Nr%rrrrr�<r&r�c@r")�
MissingSmbz.
    Raised when no smb library is found.
    Nr%rrrrr�Br&r�c@r")�LoggingRuntimeErrorz9
    Raised when we encounter an error while logging
    Nr%rrrrr�Hr&r�c@r")�	NxosErrorz$
    NX-OS Base Exception class
    Nr%rrrrr�Nr&r�c@r")�NxosCliErrorzN
    NX-OS Cli Error raised when Cli command rejected by the NX-OS device
    Nr%rrrrr�Tr&r�c@r")�NxosClientErrorzO
    NX-OS Client Error raised for problems connecting to the NX-OS device
    Nr%rrrrr�Zr&r�c@r")�NxosRequestNotSupportedz0
    Raised for unsupported client requests
    Nr%rrrrr�`r&r�c@r")�
CodePageErrorzS
    Raised when an error ocurs while getting or setting the windows code page
    Nr%rrrrr�fr&r�)Ur r9�loggingrFZsalt.defaults.exitcodesr�	getLoggerrrDr	r
�	Exceptionrr#r'r(r)r*rhr+r,r-r.r/r>r?r@rArCrJrLr5rMrNrOrXrZr[r\r]r^r_r`rarbrcrdrerfrgrkrlrorprqrrrsrtrurvrwrxryrzr|r}r~rr�r�r�r�r�r�r�r�r�r��RuntimeErrorr�r�r�r�r�r�rrrr�<module>s�
>2