Kaydet (Commit) f3321b5e authored tarafından Georg Brandl's avatar Georg Brandl

webbrowser: Silence stderr output if no gconftool or gnome browser found

üst 86070428
...@@ -434,13 +434,13 @@ def register_X_browsers(): ...@@ -434,13 +434,13 @@ def register_X_browsers():
# The default Gnome browser # The default Gnome browser
if _iscommand("gconftool-2"): if _iscommand("gconftool-2"):
# get the web browser string from gconftool # get the web browser string from gconftool
gc = 'gconftool-2 -g /desktop/gnome/url-handlers/http/command' gc = 'gconftool-2 -g /desktop/gnome/url-handlers/http/command 2>/dev/null'
out = os.popen(gc) out = os.popen(gc)
commd = out.read().strip() commd = out.read().strip()
retncode = out.close() retncode = out.close()
# if successful, register it # if successful, register it
if retncode == None and len(commd) != 0: if retncode is None and commd:
register("gnome", None, BackgroundBrowser(commd)) register("gnome", None, BackgroundBrowser(commd))
# First, the Mozilla/Netscape browsers # First, the Mozilla/Netscape browsers
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment