summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xLib/webbrowser.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py
index a9eac69650..fb6c83b19b 100755
--- a/Lib/webbrowser.py
+++ b/Lib/webbrowser.py
@@ -491,7 +491,8 @@ def register_X_browsers():
if os.environ.get("DISPLAY"):
try:
cmd = "xdg-settings get default-web-browser".split()
- result = subprocess.check_output(cmd).decode().strip()
+ raw_result = subprocess.check_output(cmd, stderr=subprocess.DEVNULL)
+ result = raw_result.decode().strip()
except (FileNotFoundError, subprocess.CalledProcessError):
pass
else: