Skip to content

Commit f06681e

Browse files
committed
Use !r for the URL
1 parent 5c0dcb3 commit f06681e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/webbrowser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def open_new_tab(self, url):
167167
def _check_url(url):
168168
"""Ensures that the URL is safe to pass to subprocesses as a parameter"""
169169
if url and url.lstrip().startswith("-"):
170-
raise ValueError(f"Invalid URL: {url}")
170+
raise ValueError(f"Invalid URL (leading dash disallowed): {url!r}")
171171

172172

173173
class GenericBrowser(BaseBrowser):

0 commit comments

Comments
 (0)