From: Pablo Galindo Date: Fri, 6 Jul 2018 23:54:09 +0000 (+0100) Subject: [2.7] bpo-34019: Fix wrong arguments for Opera Browser (GH-8047) (#8126) X-Git-Tag: v2.7.16rc1~214 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8902a1d14e9fe6fb80f4145ad4ea27a579567289;p=thirdparty%2FPython%2Fcpython.git [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 --- diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py index 23891796e33b..15eeb660e258 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 000000000000..8a9fe79b80cf --- /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.