]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-41005: Fixed perrmission error (GH-20936)
authorKrishna Chivukula <63070026+KrishnaSai2020@users.noreply.github.com>
Mon, 22 Jun 2020 09:06:07 +0000 (10:06 +0100)
committerGitHub <noreply@github.com>
Mon, 22 Jun 2020 09:06:07 +0000 (11:06 +0200)
* fixed issue 41005: webbrowser fails when xdg-settings cannot be executed

Co-authored-by: KrishnaSai2020 <krishnasai.chivukula@gmal.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Lib/webbrowser.py
Misc/NEWS.d/next/macOS/2020-06-17-13-45-15.bpo-41005.zZegdV.rst [new file with mode: 0644]

index 31e1df42479462f77702692db6f49bf0bf17c21a..cea91308ce1b30f324d3a71b921c81a3749e8f6e 100755 (executable)
@@ -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 (file)
index 0000000..3b5f3f2
--- /dev/null
@@ -0,0 +1 @@
+fixed an XDG settings issue not allowing macos to open browser in webbrowser.py
\ No newline at end of file