Skip to content

Commit 9e27bc0

Browse files
KrishnaSai2020KrishnaSai2020blurb-it[bot]
authored
bpo-41005: Fixed perrmission error (GH-20936)
* fixed issue 41005: webbrowser fails when xdg-settings cannot be executed Co-authored-by: KrishnaSai2020 <[email protected]> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
1 parent 36ff513 commit 9e27bc0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Lib/webbrowser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ def register_standard_browsers():
550550
cmd = "xdg-settings get default-web-browser".split()
551551
raw_result = subprocess.check_output(cmd, stderr=subprocess.DEVNULL)
552552
result = raw_result.decode().strip()
553-
except (FileNotFoundError, subprocess.CalledProcessError):
553+
except (FileNotFoundError, subprocess.CalledProcessError, PermissionError) :
554554
pass
555555
else:
556556
global _os_preferred_browser
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fixed an XDG settings issue not allowing macos to open browser in webbrowser.py

0 commit comments

Comments
 (0)