Skip to content

bpo-34019: Fix wrong arguments for Opera Browser #8047

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

Merged
merged 1 commit into from
Jul 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
16 changes: 8 additions & 8 deletions Lib/test/test_webbrowser.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,23 +170,23 @@ class OperaCommandTest(CommandTestMixin, unittest.TestCase):

def test_open(self):
self._test('open',
options=['-remote'],
arguments=['openURL({})'.format(URL)])
options=[],
arguments=[URL])

def test_open_with_autoraise_false(self):
self._test('open', kw=dict(autoraise=False),
options=['-remote', '-noraise'],
arguments=['openURL({})'.format(URL)])
options=[],
arguments=[URL])

def test_open_new(self):
self._test('open_new',
options=['-remote'],
arguments=['openURL({},new-window)'.format(URL)])
options=['--new-window'],
arguments=[URL])

def test_open_new_tab(self):
self._test('open_new_tab',
options=['-remote'],
arguments=['openURL({},new-page)'.format(URL)])
options=[],
arguments=[URL])


class ELinksCommandTest(CommandTestMixin, unittest.TestCase):
Expand Down
7 changes: 3 additions & 4 deletions Lib/webbrowser.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,10 @@ class Chrome(UnixBrowser):
class Opera(UnixBrowser):
"Launcher class for Opera browser."

raise_opts = ["-noraise", ""]
remote_args = ['-remote', 'openURL(%s%action)']
remote_args = ['%action', '%s']
remote_action = ""
remote_action_newwin = ",new-window"
remote_action_newtab = ",new-page"
remote_action_newwin = "--new-window"
remote_action_newtab = ""
background = True


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
webbrowser: Correct the arguments passed to Opera Browser when opening a new URL
using the ``webbrowser`` module. Patch by Bumsik Kim.