Skip to content

Commit

Permalink
Merge pull request #6017 from nateprewitt/schema2scheme
Browse files Browse the repository at this point in the history
Fix erroneous use of 'schema' instead of 'scheme'
  • Loading branch information
sigmavirus24 committed Dec 29, 2021
2 parents e2064a2 + 4246792 commit 2b06a95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions requests/exceptions.py
Expand Up @@ -80,11 +80,11 @@ class TooManyRedirects(RequestException):


class MissingSchema(RequestException, ValueError):
"""The URL schema (e.g. http or https) is missing."""
"""The URL scheme (e.g. http or https) is missing."""


class InvalidSchema(RequestException, ValueError):
"""See defaults.py for valid schemas."""
"""The URL scheme provided is either invalid or unsupported."""


class InvalidURL(RequestException, ValueError):
Expand Down
2 changes: 1 addition & 1 deletion requests/models.py
Expand Up @@ -386,7 +386,7 @@ def prepare_url(self, url, params):
raise InvalidURL(*e.args)

if not scheme:
error = ("Invalid URL {0!r}: No schema supplied. Perhaps you meant http://{0}?")
error = ("Invalid URL {0!r}: No scheme supplied. Perhaps you meant http://{0}?")
error = error.format(to_native_string(url, 'utf8'))

raise MissingSchema(error)
Expand Down

0 comments on commit 2b06a95

Please sign in to comment.