Use repr when printing unknown url type in urlopen.
This commit is contained in:
parent
03b2a1ce51
commit
d8a46969f7
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue