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

Skip to content

Commit c616604

Browse files
committed
Merge: Use repr when printing unknown url type in urlopen.
2 parents 9c7dfbf + d8a4696 commit c616604

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
@@ -297,7 +297,7 @@ def data(self):
297297
def _parse(self):
298298
self.type, rest = splittype(self.full_url)
299299
if self.type is None:
300-
raise ValueError("unknown url type: %s" % self.full_url)
300+
raise ValueError("unknown url type: %r" % self.full_url)
301301
self.host, self.selector = splithost(rest)
302302
if self.host:
303303
self.host = unquote(self.host)

0 commit comments

Comments
 (0)