HEX
Server: LiteSpeed
System: Linux s787.bom1.mysecurecloudhost.com 4.18.0-477.13.1.lve.el8.x86_64 #1 SMP Thu Jun 1 16:40:47 EDT 2023 x86_64
User: mobilech (5348)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/git/__pycache__/exc.cpython-310.pyc
o

;j��@sjdZgd�ZddlmZmZmZmZmZmZm	Z	m
Z
ddlmZddl
mZddlmZmZmZmZmZddlmZerBddlmZGd	d
�d
e�ZGdd�de�ZGd
d�de�ZGdd�dee�ZGdd�de�ZGdd�de�Z Gdd�de�Z!Gdd�de!�Z"Gdd�de!�Z#Gdd�de�Z$Gdd�de�Z%Gdd �d e%�Z&Gd!d"�d"e!�Z'Gd#d$�d$e�Z(d%S)&z-Exceptions thrown throughout the git package.)�AmbiguousObjectName�BadName�	BadObject�
BadObjectType�
InvalidDBRoot�ODBError�
ParseError�UnsupportedOperation�GitError�InvalidGitRepositoryError�WorkTreeRepositoryUnsupported�NoSuchPathError�UnsafeProtocolError�UnsafeOptionError�CommandError�GitCommandNotFound�GitCommandError�
CheckoutError�
CacheError�UnmergedEntriesError�HookExecutionError�RepositoryDirtyError�)rrrrrrrr��safe_decode)�remove_password_if_present)�List�Sequence�Tuple�
TYPE_CHECKING�Union)�PathLike)�Repoc@�eZdZdZdS)r	z&Base class for all package exceptions.N��__name__�
__module__�__qualname__�__doc__�r(r(�;/opt/saltstack/salt/lib/python3.10/site-packages/git/exc.pyr	=�r	c@r")r
zAThrown if the given repository appears to have an invalid format.Nr#r(r(r(r)r
Ar*r
c@r")rz:Thrown to indicate we can't handle work tree repositories.Nr#r(r(r(r)rEr*rc@r")rz3Thrown if a path could not be access by the system.Nr#r(r(r(r)rIr*rc@r")r
zGThrown if unsafe protocols are passed without being explicitly allowed.Nr#r(r(r(r)r
Mr*r
c@r")rzEThrown if unsafe options are passed without being explicitly allowed.Nr#r(r(r(r)rQr*rc@s�eZdZdZdZ				ddeeeeedfefdeee	de
fdeeedfdeeedfd	df
d
d�Zd	efdd
�Z
dS)rz�Base class for exceptions thrown at every stage of :class:`~subprocess.Popen`
    execution.

    :param command:
        A non-empty list of argv comprising the command-line.
    zCmd('%s') failed%sN�command.�status�stderr�stdout�returnc	Cst|ttf�s|��}t|�|_||_|rMt|t�r(dt|�j	t
t|��f}n%zdt|�}Wnt
tfyLt
t|��}t|t�rHd|n|}Ynwt
|jd�|_d�dd�|jD��|_|rgd|phd	|_t
|�}t
|�}|rxd
|pyd|_|r�d|p�d|_dS)
Nz%s('%s')z
exit code(%s)z'%s'r� css�|]}t|�VqdS�Nr)�.0�ir(r(r)�	<genexpr>{s�z(CommandError.__init__.<locals>.<genexpr>z due to: %s�!z
  stdout: '%s'�z
  stderr: '%s')�
isinstance�tuple�list�splitrr+r,�	Exception�typer$r�str�int�
ValueError�	TypeError�_cmd�join�_cmdline�_causer.r-)�selfr+r,r-r.�sZ
stdout_decodeZ
stderr_decoder(r(r)�__init__es(

�zCommandError.__init__cCs"|jd|j|j|j|j|jfS)Nz
  cmdline: %s%s%s)�_msgrArDrCr.r-�rEr(r(r)�__str__�s�zCommandError.__str__�NNN)r$r%r&r'rHrrr=rr>r;�bytesrGrJr(r(r(r)rUs&
�����
�rcsHeZdZdZdeeeeeefdeeefddf�fdd�Z	�Z
S)rz�Thrown if we cannot find the ``git`` executable in the :envvar:`PATH` or at the
    path given by the :envvar:`GIT_PYTHON_GIT_EXECUTABLE` environment variable.r+�causer/Ncst��||�d|_dS)NzCmd('%s') not found%s��superrGrH)rEr+rM��	__class__r(r)rG�s
zGitCommandNotFound.__init__)r$r%r&r'rrr=rr;rG�
__classcell__r(r(rPr)r�s<rcsteZdZdZ			ddeeeeedfefdeeede	fdee
edfdee
edfddf
�fd	d
�
Z�ZS)rzGThrown if execution of the git command fails with non-zero status code.Nr+.r,r-r.r/cst��||||�dSr1)rOrG�rEr+r,r-r.rPr(r)rG�szGitCommandError.__init__rK�
r$r%r&r'rrr=rr>r;rLrGrRr(r(rPr)r�s ������rc
@sHeZdZdZdedeedeedeeddf
dd	�Zdefd
d�Z	dS)raThrown if a file could not be checked out from the index as it contained
    changes.

    The :attr:`failed_files` attribute contains a list of relative paths that failed to
    be checked out as they contained changes that did not exist in the index.

    The :attr:`failed_reasons` attribute contains a string informing about the actual
    cause of the issue.

    The :attr:`valid_files` attribute contains a list of relative paths to files that
    were checked out successfully and hence match the version stored in the index.
    �message�failed_files�valid_files�failed_reasonsr/NcCs"t�||�||_||_||_dSr1)r;rGrVrXrW)rErUrVrWrXr(r(r)rG�s
zCheckoutError.__init__cCst�|�d|jS)Nz:%s)r;rJrVrIr(r(r)rJ�szCheckoutError.__str__)
r$r%r&r'r=rr rrGrJr(r(r(r)r�s
����
�rc@r")rzUBase for all errors related to the git index, which is called "cache"
    internally.Nr#r(r(r(r)r�r*rc@r")rz[Thrown if an operation cannot proceed as there are still unmerged
    entries in the cache.Nr#r(r(r(r)r�r*rcsreZdZdZ		ddeeeeedfefdeeede	fdee
edfdee
edfddf
�fd	d
�
Z�ZS)rz�Thrown if a hook exits with a non-zero exit code.

    This provides access to the exit code and the string returned via standard output.
    Nr+.r,r-r.r/cst��||||�d|_dS)NzHook('%s') failed%srNrSrPr(r)rG�s
zHookExecutionError.__init__)NNrTr(r(rPr)r�s	������rc@s4eZdZdZdddeddfdd�Zdefd	d
�ZdS)rzoThrown whenever an operation on a repository fails as it has uncommitted changes
    that would be overwritten.�repor!rUr/NcCs||_||_dSr1�rYrU)rErYrUr(r(r)rG�s
zRepositoryDirtyError.__init__cCsd|j|jfS)Nz'Operation cannot be performed on %r: %srZrIr(r(r)rJ�szRepositoryDirtyError.__str__)r$r%r&r'r=rGrJr(r(r(r)r�srN))r'�__all__Z	gitdb.excrrrrrrrrZ
git.compatrZgit.utilr�typingrrrrrZ	git.typesr Z
git.repo.baser!r;r	r
r�OSErrorrr
rrrrrrrrrr(r(r(r)�<module>s.(7