Issue 2666: webbrowser.py doesn't properly handle BROWSER env var - Python tracker

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, phd
Priority: normal Keywords: patch

Created on 2008-04-21 20:16 by phd, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
webbrowser.py.patch phd, 2008-11-15 15:42
Messages (3)
msg65665 - (view) Author: Oleg Broytman (phd) * Date: 2008-04-21 20:16
webbrowser.py ignores browsers listed in the BROWSER environment
variables if it doesn't recognize the browser. For example, if I add
"links2" to the BROWSER env var, webbrowser.py ignores it.

It is because _synthesize() doesn't know how to handle an unknown
browser. The attached patch checks if _synthesize() doesn't register a
browser and registers a GenericBrowser.

Another approach would be to register GenericBrowser in _synthesize().
msg75914 - (view) Author: Oleg Broytman (phd) * Date: 2008-11-15 15:42
Update the patch.
msg92235 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-09-04 06:59
Thanks, applied in r74643.