diff options
author | Georg Brandl <georg@python.org> | 2006-08-08 11:52:34 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-08-08 11:52:34 (GMT) |
commit | f3321b5e76e47286899265f3be103f958b22b912 (patch) | |
tree | e26910a9d61202ee24c16b9dad625b0ed3f2a4eb | |
parent | 86070428898b811339b0e4454e10ebf6f6ad4641 (diff) | |
download | cpython-f3321b5e76e47286899265f3be103f958b22b912.zip cpython-f3321b5e76e47286899265f3be103f958b22b912.tar.gz cpython-f3321b5e76e47286899265f3be103f958b22b912.tar.bz2 |
webbrowser: Silence stderr output if no gconftool or gnome browser found
-rw-r--r-- | Lib/webbrowser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py index bae0caf..7a1a3b4 100644 --- a/Lib/webbrowser.py +++ b/Lib/webbrowser.py @@ -434,13 +434,13 @@ def register_X_browsers(): # The default Gnome browser if _iscommand("gconftool-2"): # 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) commd = out.read().strip() retncode = out.close() # if successful, register it - if retncode == None and len(commd) != 0: + if retncode is None and commd: register("gnome", None, BackgroundBrowser(commd)) # First, the Mozilla/Netscape browsers |