]> granicus.if.org Git - python/commitdiff
Fixed bug
authorGustavo Niemeyer <gustavo@niemeyer.net>
Mon, 25 Nov 2002 17:25:04 +0000 (17:25 +0000)
committerGustavo Niemeyer <gustavo@niemeyer.net>
Mon, 25 Nov 2002 17:25:04 +0000 (17:25 +0000)
[#495695] webbrowser.py: selection of browser

* Lib/webbrowser.py
  Only include graphic browsers in _tryorder if DISPLAY is set. Also,
  included skipstone support, as suggested by Fred in the mentioned bug.

* Misc/NEWS
  Mention fix and skipstone inclusion.

Lib/webbrowser.py
Misc/NEWS

index efdebdc8b1a35112ab2c7a2336cc46a9d3f79ba6..cb9dbb36bd8a6b77d63f1fc9eaf3f7688cc848d5 100644 (file)
@@ -261,8 +261,7 @@ class WindowsDefault:
 # the TERM and DISPLAY cases, because we might be running Python from inside
 # an xterm.
 if os.environ.get("TERM") or os.environ.get("DISPLAY"):
-    _tryorder = ["galeon", "mozilla", "netscape", "kfm",
-                 "grail", "links", "lynx", "w3m",]
+    _tryorder = ["links", "lynx", "w3m"]
 
     # Easy cases first -- register console browsers if we have them.
     if os.environ.get("TERM"):
@@ -278,6 +277,9 @@ if os.environ.get("TERM") or os.environ.get("DISPLAY"):
 
     # X browsers have more in the way of options
     if os.environ.get("DISPLAY"):
+        _tryorder = ["galeon", "skipstone", "mozilla", "netscape",
+                     "kfm", "grail"] + _tryorder
+
         # First, the Netscape series
         if _iscommand("mozilla"):
             register("mozilla", None, Netscape("mozilla"))
@@ -293,6 +295,11 @@ if os.environ.get("TERM") or os.environ.get("DISPLAY"):
         if _iscommand("galeon"):
             register("galeon", None, Galeon("galeon"))
 
+        # Skipstone, another Gtk/Mozilla based browser
+        if _iscommand("skipstone"):
+            register("skipstone", None, GenericBrowser(
+                "skipstone '%s' >/dev/null &"))
+
         # Konqueror/kfm, the KDE browser.
         if _iscommand("kfm") or _iscommand("konqueror"):
             register("kfm", Konqueror, Konqueror())
index d1fa3f9a711775f8b2b14a4a64399db3a6a2b440..2f786945a35fe5a8007dd01d5162c3a0a1e87f66 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -628,6 +628,10 @@ Library
   the config file, including the contents of the referred filename in
   the "%verifyscript" section of the rpm spec file.
 
+- Fixed bug #495695: webbrowser module would run graphic browsers in a
+  unix environment even if DISPLAY was not set. Also, support for
+  skipstone browser was included.
+
 Tools/Demos
 -----------