[Python-checkins] cpython (merge 3.3 -> default): Merge: Use repr when printing unknown url type in urlopen.

r.david.murray python-checkins at python.org
Wed Apr 3 13:01:20 CEST 2013


http://hg.python.org/cpython/rev/3b1dbe7a2aa0
changeset:   83079:3b1dbe7a2aa0
parent:      83077:3c7a9c31001c
parent:      83078:a38dd5df235c
user:        R David Murray <rdmurray at bitdance.com>
date:        Wed Apr 03 07:01:07 2013 -0400
summary:
  Merge: 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
@@ -297,7 +297,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