[Python-checkins] [2.7] bpo-34019: Fix wrong arguments for Opera Browser (GH-8047) (#8126)

Pablo Galindo webhook-mailer at python.org
Fri Jul 6 19:54:13 EDT 2018


https://github.com/python/cpython/commit/8902a1d14e9fe6fb80f4145ad4ea27a579567289
commit: 8902a1d14e9fe6fb80f4145ad4ea27a579567289
branch: 2.7
author: Pablo Galindo <Pablogsal at gmail.com>
committer: GitHub <noreply at github.com>
date: 2018-07-07T00:54:09+01:00
summary:

[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 <k.bumsik at gmail.com>

files:
A Misc/NEWS.d/next/Library/2018-07-02-05-59-11.bpo-34019.ZXJIife.rst
M Lib/webbrowser.py

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 @@ 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
 
 
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.



More information about the Python-checkins mailing list