X7ROOT File Manager
Current Path:
/usr/lib/python2.7/site-packages/requests
usr
/
lib
/
python2.7
/
site-packages
/
requests
/
📁
..
📄
__init__.py
(1.83 KB)
📄
__init__.pyc
(2.49 KB)
📄
__init__.pyo
(2.49 KB)
📄
adapters.py
(16.3 KB)
📄
adapters.pyc
(15.33 KB)
📄
adapters.pyo
(15.33 KB)
📄
api.py
(5.16 KB)
📄
api.pyc
(5.89 KB)
📄
api.pyo
(5.89 KB)
📄
auth.py
(6.55 KB)
📄
auth.pyc
(7.37 KB)
📄
auth.pyo
(7.37 KB)
📄
certs.py
(649 B)
📄
certs.pyc
(897 B)
📄
certs.pyo
(897 B)
📄
compat.py
(1.5 KB)
📄
compat.pyc
(1.62 KB)
📄
compat.pyo
(1.62 KB)
📄
cookies.py
(16.4 KB)
📄
cookies.pyc
(19.8 KB)
📄
cookies.pyo
(19.8 KB)
📄
exceptions.py
(2.45 KB)
📄
exceptions.pyc
(5.15 KB)
📄
exceptions.pyo
(5.15 KB)
📄
hooks.py
(820 B)
📄
hooks.pyc
(1.03 KB)
📄
hooks.pyo
(1.03 KB)
📄
models.py
(27.46 KB)
📄
models.pyc
(24.28 KB)
📄
models.pyo
(24.28 KB)
📁
packages
📄
sessions.py
(25.01 KB)
📄
sessions.pyc
(20.04 KB)
📄
sessions.pyo
(20.04 KB)
📄
status_codes.py
(3.13 KB)
📄
status_codes.pyc
(4.36 KB)
📄
status_codes.pyo
(4.36 KB)
📄
structures.py
(2.91 KB)
📄
structures.pyc
(5.02 KB)
📄
structures.pyo
(5.02 KB)
📄
utils.py
(20.88 KB)
📄
utils.pyc
(20.08 KB)
📄
utils.pyo
(20.08 KB)
Editing: exceptions.py
# -*- coding: utf-8 -*- """ requests.exceptions ~~~~~~~~~~~~~~~~~~~ This module contains the set of Requests' exceptions. """ from urllib3.exceptions import HTTPError as BaseHTTPError class RequestException(IOError): """There was an ambiguous exception that occurred while handling your request.""" def __init__(self, *args, **kwargs): """ Initialize RequestException with `request` and `response` objects. """ response = kwargs.pop('response', None) self.response = response self.request = kwargs.pop('request', None) if (response is not None and not self.request and hasattr(response, 'request')): self.request = self.response.request super(RequestException, self).__init__(*args, **kwargs) class HTTPError(RequestException): """An HTTP error occurred.""" class ConnectionError(RequestException): """A Connection error occurred.""" class ProxyError(ConnectionError): """A proxy error occurred.""" class SSLError(ConnectionError): """An SSL error occurred.""" class Timeout(RequestException): """The request timed out. Catching this error will catch both :exc:`~requests.exceptions.ConnectTimeout` and :exc:`~requests.exceptions.ReadTimeout` errors. """ class ConnectTimeout(ConnectionError, Timeout): """The request timed out while trying to connect to the remote server. Requests that produced this error are safe to retry. """ class ReadTimeout(Timeout): """The server did not send any data in the allotted amount of time.""" class URLRequired(RequestException): """A valid URL is required to make a request.""" class TooManyRedirects(RequestException): """Too many redirects.""" class MissingSchema(RequestException, ValueError): """The URL schema (e.g. http or https) is missing.""" class InvalidSchema(RequestException, ValueError): """See defaults.py for valid schemas.""" class InvalidURL(RequestException, ValueError): """ The URL provided was somehow invalid. """ class ChunkedEncodingError(RequestException): """The server declared chunked encoding but sent an invalid chunk.""" class ContentDecodingError(RequestException, BaseHTTPError): """Failed to decode response content""" class StreamConsumedError(RequestException, TypeError): """The content for this response was already consumed""" class RetryError(RequestException): """Custom retries logic failed"""
Upload File
Create Folder