[Python-checkins] bpo-41005: Fixed perrmission error (GH-20936) (GH-21052)

Miss Islington (bot) webhook-mailer at python.org
Wed Jun 24 08:58:46 EDT 2020


https://github.com/python/cpython/commit/adf8708c44945bfa68db8b02c6a1f560f05a5151
commit: adf8708c44945bfa68db8b02c6a1f560f05a5151
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2020-06-24T14:58:27+02:00
summary:

bpo-41005: Fixed perrmission error (GH-20936) (GH-21052)

* fixed issue 41005: webbrowser fails when xdg-settings cannot be executed

Co-authored-by: KrishnaSai2020 <krishnasai.chivukula at gmal.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 9e27bc0c1efc7478872f98729f87886e9333548f)

Co-authored-by: Krishna Chivukula <63070026+KrishnaSai2020 at users.noreply.github.com>

Co-authored-by: Krishna Chivukula <63070026+KrishnaSai2020 at users.noreply.github.com>

files:
A Misc/NEWS.d/next/macOS/2020-06-17-13-45-15.bpo-41005.zZegdV.rst
M Lib/webbrowser.py

diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py
index 3dcf66b659825..53e0efc967a0e 100755
--- a/Lib/webbrowser.py
+++ b/Lib/webbrowser.py
@@ -550,7 +550,7 @@ def register_standard_browsers():
                 cmd = "xdg-settings get default-web-browser".split()
                 raw_result = subprocess.check_output(cmd, stderr=subprocess.DEVNULL)
                 result = raw_result.decode().strip()
-            except (FileNotFoundError, subprocess.CalledProcessError):
+            except (FileNotFoundError, subprocess.CalledProcessError, PermissionError) :
                 pass
             else:
                 global _os_preferred_browser
diff --git a/Misc/NEWS.d/next/macOS/2020-06-17-13-45-15.bpo-41005.zZegdV.rst b/Misc/NEWS.d/next/macOS/2020-06-17-13-45-15.bpo-41005.zZegdV.rst
new file mode 100644
index 0000000000000..3b5f3f23a12f5
--- /dev/null
+++ b/Misc/NEWS.d/next/macOS/2020-06-17-13-45-15.bpo-41005.zZegdV.rst
@@ -0,0 +1 @@
+fixed an XDG settings issue not allowing macos to open browser in webbrowser.py
\ No newline at end of file



More information about the Python-checkins mailing list