[Python-checkins] cpython (3.3): Use repr when printing unknown url type in urlopen.
r.david.murray
python-checkins at python.org
Wed Apr 3 13:01:19 CEST 2013
http://hg.python.org/cpython/rev/a38dd5df235c
changeset: 83078:a38dd5df235c
branch: 3.3
parent: 83076:5dc976ce1b50
user: R David Murray <rdmurray at bitdance.com>
date: Wed Apr 03 06:58:34 2013 -0400
summary:
Use repr when printing unknown url type in urlopen.
files:
Lib/urllib/request.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -281,7 +281,7 @@
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)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list