summaryrefslogtreecommitdiff
path: root/Lib/webbrowser.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-09-04 06:59:20 +0000
committerGeorg Brandl <georg@python.org>2009-09-04 06:59:20 +0000
commit2e1308f520be34d1d1ca2a979a6dc9830e189137 (patch)
tree277644c5b53a13c6617aa478b72322983f151a53 /Lib/webbrowser.py
parente7e941e7f7a47be54198be79d2280ab3025e5ff1 (diff)
downloadcpython-git-2e1308f520be34d1d1ca2a979a6dc9830e189137.tar.gz
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.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py
index bfd353a467..74f0270122 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