HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python3/dist-packages/click/__pycache__/exceptions.cpython-38.pyc
U

L�[��@s�ddlmZmZmZddlmZdd�ZGdd�de�ZGdd�de�Z	Gd	d
�d
e	�Z
Gdd�de
�ZGd
d�de	�ZGdd�de	�Z
Gdd�de	�ZGdd�de�ZGdd�de�ZGdd�de�ZdS)�)�PY2�filename_to_ui�get_text_stderr)�echocCs&t|ttf�r"d�dd�|D��S|S)Nz / css|]}d|VqdS)z"%s"N�)�.0�xrr�2/usr/lib/python3/dist-packages/click/exceptions.py�	<genexpr>sz$_join_param_hints.<locals>.<genexpr>)�
isinstance�tuple�list�join)�
param_hintrrr	�_join_param_hintssrc@sFeZdZdZdZdd�Zdd�Zdd�Zer8eZ	d	d�Zd
dd�Z
d
S)�ClickExceptionz8An exception that Click can handle and show to the user.rcCs0|}tr|dk	r|�d�}t�||�||_dS�Nzutf-8)r�encode�	Exception�__init__�message)�selfrZctor_msgrrr	rs
zClickException.__init__cCs|jS�N�r�rrrr	�format_messageszClickException.format_messagecCs|jSrrrrrr	�__str__szClickException.__str__cCs|j�d�Sr)rrrrrr	r"sNcCs&|dkrt�}td|��|d�dS)N�	Error: %s)�file)rrr)rrrrr	�show%szClickException.show)N)�__name__�
__module__�__qualname__�__doc__�	exit_coderrrrZ__unicode__rrrrr	rsrc@s(eZdZdZdZddd�Zd	dd�ZdS)
�
UsageErrora+An internal exception that signals a usage error.  This typically
    aborts any further handling.

    :param message: the error message to display.
    :param ctx: optionally the context that caused this error.  Click will
                fill in the context automatically in some situations.
    �NcCs*t�||�||_|jr |jjp"d|_dSr)rr�ctxZcommand�cmd�rrr'rrr	r5szUsageError.__init__cCs�|dkrt�}d}d}|jdk	rJ|j�|j�dk	rJd|jj|jjdf}|jdk	rx|jj}t|j��d|||d�td|�	�||d�dS)N�zTry "%s %s" for help.
�z
%s)r�colorr)
rr(Zget_help_optionr'Zcommand_pathZhelp_option_namesr,rZ	get_usager)rrr,�hintrrr	r:s
��
zUsageError.show)N)N)r r!r"r#r$rrrrrr	r%+s
r%c@s"eZdZdZddd�Zdd�ZdS)�BadParametera
An exception that formats out a standardized error message for a
    bad parameter.  This is useful when thrown from a callback or type as
    Click will attach contextual information to it (for instance, which
    parameter it is).

    .. versionadded:: 2.0

    :param param: the parameter object that caused this error.  This can
                  be left out, and Click will attach this info itself
                  if possible.
    :param param_hint: a string that shows up as parameter name.  This
                       can be used as alternative to `param` in cases
                       where custom validation should happen.  If it is
                       a string it's used as such, if it's a list then
                       each item is quoted and separated.
    NcCst�|||�||_||_dSr)r%r�paramr)rrr'r/rrrr	r[szBadParameter.__init__cCsL|jdk	r|j}n$|jdk	r,|j�|j�}n
d|jSt|�}d||jfS)NzInvalid value: %szInvalid value for %s: %s)rr/�get_error_hintr'rr)rrrrr	ras


zBadParameter.format_message)NNN�r r!r"r#rrrrrr	r.Is
�
r.c@s"eZdZdZddd�Zdd�ZdS)�MissingParametera�Raised if click required an option or argument but it was not
    provided when invoking the script.

    .. versionadded:: 4.0

    :param param_type: a string that indicates the type of the parameter.
                       The default is to inherit the parameter type from
                       the given `param`.  Valid values are ``'parameter'``,
                       ``'option'`` or ``'argument'``.
    NcCst�|||||�||_dSr)r.r�
param_type)rrr'r/rr3rrr	ryszMissingParameter.__init__cCs�|jdk	r|j}n|jdk	r,|j�|j�}nd}t|�}|j}|dkrX|jdk	rX|jj}|j}|jdk	r�|jj�	|j�}|r�|r�|d|7}n|}d||r�d|p�d|r�dp�d|p�dfS)Nz.  zMissing %s%s%s%sz %sr*�.)
rr/r0r'rr3Zparam_type_namer�typeZget_missing_message)rrr3�msgZ	msg_extrarrr	r~s,



�zMissingParameter.format_message)NNNNNr1rrrr	r2ms�
r2c@s"eZdZdZddd�Zdd�ZdS)�NoSuchOptionzfRaised if click attempted to handle an option that does not
    exist.

    .. versionadded:: 4.0
    NcCs.|dkrd|}t�|||�||_||_dS)Nzno such option: %s)r%r�option_name�
possibilities)rr8rr9r'rrr	r�s
zNoSuchOption.__init__cCsZ|jg}|jrPt|j�dkr2|�d|jd�nt|j�}|�dd�|��d�|�S)NrzDid you mean %s?r+z(Possible options: %s)z, z  )rr9�len�append�sortedr)r�bitsr9rrr	r�s
zNoSuchOption.format_message)NNNr1rrrr	r7�s
�
r7c@seZdZdZddd�ZdS)�BadOptionUsageaRaised if an option is generally supplied but the use of the option
    was incorrect.  This is for instance raised if the number of arguments
    for an option is not correct.

    .. versionadded:: 4.0

    :param option_name: the name of the option being used incorrectly.
    NcCst�|||�||_dSr)r%rr8)rr8rr'rrr	r�szBadOptionUsage.__init__)N�r r!r"r#rrrrr	r>�s	r>c@seZdZdZddd�ZdS)�BadArgumentUsagez�Raised if an argument is generally supplied but the use of the argument
    was incorrect.  This is for instance raised if the number of values
    for an argument is not correct.

    .. versionadded:: 6.0
    NcCst�|||�dSr)r%rr)rrr	r�szBadArgumentUsage.__init__)Nr?rrrr	r@�sr@c@s"eZdZdZddd�Zdd�ZdS)�	FileErrorz"Raised if a file cannot be opened.NcCs0t|�}|dkrd}t�||�||_||_dS)Nz
unknown error)rrr�ui_filename�filename)rrCr-rBrrr	r�szFileError.__init__cCsd|j|jfS)NzCould not open file %s: %s)rBrrrrr	r�szFileError.format_message)Nr1rrrr	rA�s
rAc@seZdZdZdS)�Abortz=An internal signalling exception that signals Click to abort.N)r r!r"r#rrrr	rD�srDc@seZdZdZddd�ZdS)�Exitz�An exception that indicates that the application should exit with some
    status code.

    :param code: the status code to exit with.
    r+cCs
||_dSr)r$)r�coderrr	r�sz
Exit.__init__N)r+r?rrrr	rE�srEN)Z_compatrrrZutilsrrrrr%r.r2r7r>r@rA�RuntimeErrorrDrErrrr	�<module>s $/