summaryrefslogtreecommitdiff
path: root/Lib/webbrowser.py
diff options
context:
space:
mode:
authorZhiming Wang <i@zhimingwang.org>2018-11-26 16:29:45 -0500
committerSerhiy Storchaka <storchaka@gmail.com>2018-11-26 23:29:45 +0200
commit8c281ed403fd915284d5bba2405d7c47f8195066 (patch)
tree9e18f217805ec108324a271bb0bb6fdc692e5111 /Lib/webbrowser.py
parent5a8c240b1d97de0bd6ced2a57cbcf26da19c1fcc (diff)
downloadcpython-git-8c281ed403fd915284d5bba2405d7c47f8195066.tar.gz
bpo-35308: Fix regression where BROWSER env var is not respected. (GH-10693)
Regression introduced in e3ce695 and 25b804a, where the old parameter update_tryorder to _synthesize was first ignored, then given the opposite value in the attempt to fix bpo-31014.
Diffstat (limited to 'Lib/webbrowser.py')
-rwxr-xr-xLib/webbrowser.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py
index 1e27c83fd9..82bff835fd 100755
--- a/Lib/webbrowser.py
+++ b/Lib/webbrowser.py
@@ -86,7 +86,7 @@ def open_new_tab(url):
return open(url, 2)
-def _synthesize(browser, *, preferred=True):
+def _synthesize(browser, *, preferred=False):
"""Attempt to synthesize a controller base on existing controllers.
This is useful to create a controller when a user specifies a path to
@@ -563,7 +563,7 @@ def register_standard_browsers():
# and prepend to _tryorder
for cmdline in userchoices:
if cmdline != '':
- cmd = _synthesize(cmdline, preferred=False)
+ cmd = _synthesize(cmdline, preferred=True)
if cmd[1] is None:
register(cmdline, None, GenericBrowser(cmdline), preferred=True)