diff options
| author | Adam McKerlie <adammckerlie@gmail.com> | 2012-03-25 11:03:36 -0400 |
|---|---|---|
| committer | Adam McKerlie <adammckerlie@gmail.com> | 2012-03-25 11:03:36 -0400 |
| commit | d24ee0e1dce2b8e387aca70ce9483b93ca618fae (patch) | |
| tree | 792e419388f80f3754c62d78d572e08a8e608c56 /requests/exceptions.py | |
| parent | 6562137731f9ad11be7c156fa25220fc3a7ffe03 (diff) | |
| download | python-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.py | 6 |
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 |
