From: R David Murray Date: Wed, 3 Apr 2013 10:58:34 +0000 (-0400) Subject: Use repr when printing unknown url type in urlopen. X-Git-Tag: v3.3.2~175 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d8a46969f7034d9a56e70d24fc77e15154135199;p=python Use repr when printing unknown url type in urlopen. --- 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)