diff options
author | SVN-Git Migration <python-modules-team@lists.alioth.debian.org> | 2015-10-08 13:19:39 -0700 |
---|---|---|
committer | SVN-Git Migration <python-modules-team@lists.alioth.debian.org> | 2015-10-08 13:19:39 -0700 |
commit | 54bdd56778a37ea9d56d451d4ae49b99cbbfceaa (patch) | |
tree | 3b69a7371b29898f08ced7514b42bad8afdc8759 /urllib3/exceptions.py | |
parent | 0f393d00b51bc54c5075447e4a8b21f0bed6acd8 (diff) | |
download | python-urllib3-54bdd56778a37ea9d56d451d4ae49b99cbbfceaa.tar python-urllib3-54bdd56778a37ea9d56d451d4ae49b99cbbfceaa.tar.gz |
Imported Upstream version 1.9.1
Diffstat (limited to 'urllib3/exceptions.py')
-rw-r--r-- | urllib3/exceptions.py | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/urllib3/exceptions.py b/urllib3/exceptions.py index fff8bfa..7519ba9 100644 --- a/urllib3/exceptions.py +++ b/urllib3/exceptions.py @@ -60,7 +60,14 @@ ConnectionError = ProtocolError ## Leaf Exceptions class MaxRetryError(RequestError): - "Raised when the maximum number of retries is exceeded." + """Raised when the maximum number of retries is exceeded. + + :param pool: The connection pool + :type pool: :class:`~urllib3.connectionpool.HTTPConnectionPool` + :param string url: The requested Url + :param exceptions.Exception reason: The underlying error + + """ def __init__(self, pool, url, reason=None): self.reason = reason @@ -134,6 +141,16 @@ class LocationParseError(LocationValueError): self.location = location -class InsecureRequestWarning(HTTPWarning): +class SecurityWarning(HTTPWarning): + "Warned when perfoming security reducing actions" + pass + + +class InsecureRequestWarning(SecurityWarning): "Warned when making an unverified HTTPS request." pass + + +class SystemTimeWarning(SecurityWarning): + "Warned when system time is suspected to be wrong" + pass |