File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/requests/__pycache__/exceptions.cpython-310.pyc
Back
o ;j� � @ s� d Z ddlmZ ddlmZ G dd� de�ZG dd� de�Z G d d � d e e�ZG dd� de�ZG d d� de�Z G dd� de �ZG dd� de �ZG dd� de�Z G dd� de e �ZG dd� de �ZG dd� de�ZG dd� de�ZG dd� dee�ZG dd � d ee�ZG d!d"� d"ee�ZG d#d$� d$ee�ZG d%d&� d&e�ZG d'd(� d(e�ZG d)d*� d*ee�ZG d+d,� d,ee�ZG d-d.� d.e�ZG d/d0� d0e�ZG d1d2� d2e�ZG d3d4� d4ee �Z!G d5d6� d6e�Z"d7S )8z` requests.exceptions ~~~~~~~~~~~~~~~~~~~ This module contains the set of Requests' exceptions. � )� HTTPError� )�JSONDecodeErrorc s e Zd ZdZ� fdd�Z� ZS )�RequestExceptionzTThere was an ambiguous exception that occurred while handling your request. c sX |� dd�}|| _|� dd�| _|dur!| js!t|d�r!| jj| _t� j|i |�� dS )zBInitialize RequestException with `request` and `response` objects.�responseN�request)�popr r �hasattr�super�__init__)�self�args�kwargsr �� __class__� �G/opt/saltstack/salt/lib/python3.10/site-packages/requests/exceptions.pyr s zRequestException.__init__)�__name__� __module__�__qualname__�__doc__r � __classcell__r r r r r s r c @ � e Zd ZdZdS )�InvalidJSONErrorzA JSON error occurred.N�r r r r r r r r r � r c @ s e Zd ZdZdd� Zdd� ZdS )r z"Couldn't decode the text into jsonc O s0 t j| g|�R � tj| g| j�R i |�� dS )a Construct the JSONDecodeError instance first with all args. Then use it's args to construct the IOError so that the json specific args aren't used as IOError specific args and the error message from JSONDecodeError is preserved. N)�CompatJSONDecodeErrorr r r )r r r r r r r # s zJSONDecodeError.__init__c C s t �| �S )aa The __reduce__ method called when pickling the object must be the one from the JSONDecodeError (be it json/simplejson) as it expects all the arguments for instantiation, not just one like the IOError, and the MRO would by default call the __reduce__ method from the IOError due to the inheritance order. )r � __reduce__)r r r r r - s zJSONDecodeError.__reduce__N)r r r r r r r r r r r s r c @ r )r zAn HTTP error occurred.Nr r r r r r 8 r r c @ r )�ConnectionErrorzA Connection error occurred.Nr r r r r r <