Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d8a4696

Browse files
committed
Use repr when printing unknown url type in urlopen.
1 parent 03b2a1c commit d8a4696

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/urllib/request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def __init__(self, url, data=None, headers={},
281281
def _parse(self):
282282
self.type, rest = splittype(self.full_url)
283283
if self.type is None:
284-
raise ValueError("unknown url type: %s" % self.full_url)
284+
raise ValueError("unknown url type: %r" % self.full_url)
285285
self.host, self.selector = splithost(rest)
286286
if self.host:
287287
self.host = unquote(self.host)

0 commit comments

Comments
 (0)