summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-04-03 06:58:34 -0400
committerR David Murray <rdmurray@bitdance.com>2013-04-03 06:58:34 -0400
commit0ea6483da34b7040f3f12e938dfe95e4ebb74afc (patch)
tree0f9721790beceec36a39f07322ac6ce52bd81fb1
parent76be51972d6ff09003dd9c142f4ffd2d3fdc516b (diff)
downloadcpython-0ea6483da34b7040f3f12e938dfe95e4ebb74afc.tar.gz
Use repr when printing unknown url type in urlopen.
-rw-r--r--Lib/urllib/request.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
index 5ddec5f14e..e6f877d56e 100644
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -281,7 +281,7 @@ class Request:
def _parse(self):
self.type, rest = splittype(self.full_url)
if self.type is None:
- raise ValueError("unknown url type: %s" % self.full_url)
+ raise ValueError("unknown url type: %r" % self.full_url)
self.host, self.selector = splithost(rest)
if self.host:
self.host = unquote(self.host)