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>
This commit is contained in:
parent
36ff513f82
commit
9e27bc0c1e
|
@ -550,7 +550,7 @@ def register_standard_browsers():
|
||||||
cmd = "xdg-settings get default-web-browser".split()
|
cmd = "xdg-settings get default-web-browser".split()
|
||||||
raw_result = subprocess.check_output(cmd, stderr=subprocess.DEVNULL)
|
raw_result = subprocess.check_output(cmd, stderr=subprocess.DEVNULL)
|
||||||
result = raw_result.decode().strip()
|
result = raw_result.decode().strip()
|
||||||
except (FileNotFoundError, subprocess.CalledProcessError):
|
except (FileNotFoundError, subprocess.CalledProcessError, PermissionError) :
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
global _os_preferred_browser
|
global _os_preferred_browser
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
fixed an XDG settings issue not allowing macos to open browser in webbrowser.py
|
Loading…
Reference in New Issue