diff options
author | Georg Brandl <georg@python.org> | 2009-09-04 06:59:20 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-09-04 06:59:20 (GMT) |
commit | 2e1308f520be34d1d1ca2a979a6dc9830e189137 (patch) | |
tree | 277644c5b53a13c6617aa478b72322983f151a53 /Lib/webbrowser.py | |
parent | e7e941e7f7a47be54198be79d2280ab3025e5ff1 (diff) | |
download | cpython-2e1308f520be34d1d1ca2a979a6dc9830e189137.zip cpython-2e1308f520be34d1d1ca2a979a6dc9830e189137.tar.gz cpython-2e1308f520be34d1d1ca2a979a6dc9830e189137.tar.bz2 |
Issue #2666: Handle BROWSER environment variable properly for unknown browser names in the webbrowser module.
Diffstat (limited to 'Lib/webbrowser.py')
-rw-r--r-- | Lib/webbrowser.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py index bfd353a..74f0270 100644 --- a/Lib/webbrowser.py +++ b/Lib/webbrowser.py @@ -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 |