From 2e1308f520be34d1d1ca2a979a6dc9830e189137 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Fri, 4 Sep 2009 06:59:20 +0000 Subject: Issue #2666: Handle BROWSER environment variable properly for unknown browser names in the webbrowser module. --- Lib/webbrowser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Lib/webbrowser.py') 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 -- cgit v1.2.1