diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-07-08 07:22:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-08 07:22:32 (GMT) |
commit | 25b804a9c21c735ce322877f105ebab2539ccfc1 (patch) | |
tree | 864aaead0e0372f44e477c30cba826e9e2ca497f /Lib/webbrowser.py | |
parent | 0830858aeedecc9ece60349f8c31c2690d1a99f8 (diff) | |
download | cpython-25b804a9c21c735ce322877f105ebab2539ccfc1.zip cpython-25b804a9c21c735ce322877f105ebab2539ccfc1.tar.gz cpython-25b804a9c21c735ce322877f105ebab2539ccfc1.tar.bz2 |
bpo-31014: Fix the webbrowser module. (GH-7267)
webbrowser._synthesize() called webbrowser.register() with
outdated signature.
Co-Authored-By: John Still <john@jmsdvl.com>
Diffstat (limited to 'Lib/webbrowser.py')
-rwxr-xr-x | Lib/webbrowser.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py index d717193..1e27c83 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, update_tryorder=1): +def _synthesize(browser, *, preferred=True): """Attempt to synthesize a controller base on existing controllers. This is useful to create a controller when a user specifies a path to @@ -113,7 +113,7 @@ def _synthesize(browser, update_tryorder=1): controller = copy.copy(controller) controller.name = browser controller.basename = os.path.basename(browser) - register(browser, None, controller, update_tryorder) + register(browser, None, instance=controller, preferred=preferred) return [None, controller] return [None, None] @@ -563,7 +563,7 @@ def register_standard_browsers(): # and prepend to _tryorder for cmdline in userchoices: if cmdline != '': - cmd = _synthesize(cmdline, -1) + cmd = _synthesize(cmdline, preferred=False) if cmd[1] is None: register(cmdline, None, GenericBrowser(cmdline), preferred=True) |