From 8902a1d14e9fe6fb80f4145ad4ea27a579567289 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Sat, 7 Jul 2018 00:54:09 +0100 Subject: [2.7] bpo-34019: Fix wrong arguments for Opera Browser (GH-8047) (#8126) The Opera Browser was using a outdated command line invocation that resulted in an incorrect URL being opened in the browser when requested using the webbrowser module. * Correct the arguments passed to the Opera Browser when opening a new URL.. (cherry picked from commit 3cf1f154edb88c108877729ea09f4ac174697fea) Co-authored-by: Bumsik Kim --- Lib/webbrowser.py | 7 +++---- Misc/NEWS.d/next/Library/2018-07-02-05-59-11.bpo-34019.ZXJIife.rst | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2018-07-02-05-59-11.bpo-34019.ZXJIife.rst diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py index 2389179..15eeb66 100755 --- a/Lib/webbrowser.py +++ b/Lib/webbrowser.py @@ -319,11 +319,10 @@ Chromium = Chrome 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 diff --git a/Misc/NEWS.d/next/Library/2018-07-02-05-59-11.bpo-34019.ZXJIife.rst b/Misc/NEWS.d/next/Library/2018-07-02-05-59-11.bpo-34019.ZXJIife.rst new file mode 100644 index 0000000..8a9fe79 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2018-07-02-05-59-11.bpo-34019.ZXJIife.rst @@ -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. -- cgit v0.12