From bd3cf95e34aa49c8d764c899672048df107e0d70 Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Tue, 16 Dec 2014 22:49:24 -0600 Subject: [PATCH] Fix error handling on Python 3 --- requests/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requests/models.py b/requests/models.py index 22b6d110..b728c84e 100644 --- a/requests/models.py +++ b/requests/models.py @@ -353,7 +353,7 @@ class PreparedRequest(RequestEncodingMixin, RequestHooksMixin): try: scheme, auth, host, port, path, query, fragment = parse_url(url) except LocationParseError as e: - raise InvalidURL(e.message) + raise InvalidURL(*e.args) if not scheme: raise MissingSchema("Invalid URL {0!r}: No schema supplied. "