Skip to content

Commit d518ed0

Browse files
bpo-41005: Fixed perrmission error (GH-20936) (GH-21051)
* 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> (cherry picked from commit 9e27bc0) Co-authored-by: Krishna Chivukula <63070026+KrishnaSai2020@users.noreply.github.com> Co-authored-by: Krishna Chivukula <63070026+KrishnaSai2020@users.noreply.github.com>
1 parent 4b80cfb commit d518ed0

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)