Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-31014: webbrowser._synthesize calls webbrowser.register with outdated signature #2689

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/webbrowser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=update_tryorder)
Copy link
Member

@serhiy-storchaka serhiy-storchaka Jul 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update_tryorder is 1 or -1. preferred is a boolean parameter. 1 and -1 both are true in boolean context.

I think that the update_tryorder parameter of _synthesize() should be replaced with boolean preferred as in register() (see bpo-24241).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update tryorder is now a boolean as requested.

return [None, controller]
return [None, None]

Expand Down