bpo-41005: Fixed perrmission error (GH-20936)
* 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>
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py
index 31e1df4..cea9130 100755
--- a/Lib/webbrowser.py
+++ b/Lib/webbrowser.py
@@ -550,7 +550,7 @@
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