]> granicus.if.org Git - python/commitdiff
Use repr when printing unknown url type in urlopen.
authorR David Murray <rdmurray@bitdance.com>
Wed, 3 Apr 2013 10:58:34 +0000 (06:58 -0400)
committerR David Murray <rdmurray@bitdance.com>
Wed, 3 Apr 2013 10:58:34 +0000 (06:58 -0400)
Lib/urllib/request.py

index 5ddec5f14e9bf876dcd4da00e6afaf606e8c4412..e6f877d56ee9181bd08a407df252cfbf65430df6 100644 (file)
@@ -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)