mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Issue #2666: Handle BROWSER environment variable properly for unknown browser names in the webbrowser module.
This commit is contained in:
parent
e7e941e7f7
commit
2e1308f520
2 changed files with 6 additions and 1 deletions
|
@ -625,7 +625,9 @@ if "BROWSER" in os.environ:
|
|||
# and prepend to _tryorder
|
||||
for cmdline in _userchoices:
|
||||
if cmdline != '':
|
||||
_synthesize(cmdline, -1)
|
||||
cmd = _synthesize(cmdline, -1)
|
||||
if cmd[1] is None:
|
||||
register(cmdline, None, GenericBrowser(cmdline), -1)
|
||||
cmdline = None # to make del work if _userchoices was empty
|
||||
del cmdline
|
||||
del _userchoices
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue