summaryrefslogtreecommitdiff
path: root/requests/exceptions.py
diff options
context:
space:
mode:
authorAdam McKerlie <adammckerlie@gmail.com>2012-03-25 11:03:36 -0400
committerAdam McKerlie <adammckerlie@gmail.com>2012-03-25 11:03:36 -0400
commitd24ee0e1dce2b8e387aca70ce9483b93ca618fae (patch)
tree792e419388f80f3754c62d78d572e08a8e608c56 /requests/exceptions.py
parent6562137731f9ad11be7c156fa25220fc3a7ffe03 (diff)
downloadpython-requests-d24ee0e1dce2b8e387aca70ce9483b93ca618fae.tar.gz
Created MissingSchema and InvalidSchema which inherits from RequestException and ValueError
Diffstat (limited to 'requests/exceptions.py')
-rw-r--r--requests/exceptions.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/requests/exceptions.py b/requests/exceptions.py
index d5b2ab17..3c262e36 100644
--- a/requests/exceptions.py
+++ b/requests/exceptions.py
@@ -30,3 +30,9 @@ class URLRequired(RequestException):
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.""" \ No newline at end of file