diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2020-11-08 10:46:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-08 10:46:55 +0100 |
commit | 23831a7a90956e38b7d70304bb6afe30d37936de (patch) | |
tree | bf6b44fcd0786ccb770d677fdfd92f10fb506cd3 /Lib | |
parent | bpo-41100: Support macOS 11 and Apple Silicon (GH-22855) (diff) | |
download | cpython-23831a7a90956e38b7d70304bb6afe30d37936de.tar.gz cpython-23831a7a90956e38b7d70304bb6afe30d37936de.tar.bz2 cpython-23831a7a90956e38b7d70304bb6afe30d37936de.zip |
bpo-41754: Ignore NotADirectoryError in invocation of xdg-settings (GH-23075)
It is not clear why this can happen, but several users have mentioned
getting this exception on macOS.
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/webbrowser.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py index cea91308ce1..6023c1e1384 100755 --- a/Lib/webbrowser.py +++ b/Lib/webbrowser.py @@ -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, PermissionError) : + except (FileNotFoundError, subprocess.CalledProcessError, PermissionError, NotADirectoryError) : pass else: global _os_preferred_browser |