]> granicus.if.org Git - python/commitdiff
- Issue #17536: Add to webbrowser's browser list: www-browser, x-www-browser,
authordoko@ubuntu.com <doko@ubuntu.com>
Sun, 24 Mar 2013 17:50:23 +0000 (18:50 +0100)
committerdoko@ubuntu.com <doko@ubuntu.com>
Sun, 24 Mar 2013 17:50:23 +0000 (18:50 +0100)
  iceweasel, iceape.

1  2 
Lib/webbrowser.py
Misc/NEWS

index 11ecce013c32730235e401b7e6aa5a0623c23a5d,945eda4a951151b0af189d64283c9e4205dfb23f..2714bd144e38d16f792f501bcfdad4a5f2450ea8
@@@ -434,14 -465,18 +434,18 @@@ def register_X_browsers()
          register("gnome-open", None, BackgroundBrowser("gnome-open"))
  
      # The default KDE browser
 -    if "KDE_FULL_SESSION" in os.environ and _iscommand("kfmclient"):
 +    if "KDE_FULL_SESSION" in os.environ and shutil.which("kfmclient"):
          register("kfmclient", Konqueror, Konqueror("kfmclient"))
  
 -    if _iscommand("x-www-browser"):
++    if shutil.which("x-www-browser"):
+         register("x-www-browser", None, BackgroundBrowser("x-www-browser"))
      # The Mozilla/Netscape browsers
      for browser in ("mozilla-firefox", "firefox",
                      "mozilla-firebird", "firebird",
+                     "iceweasel", "iceape",
                      "seamonkey", "mozilla", "netscape"):
 -        if _iscommand(browser):
 +        if shutil.which(browser):
              register(browser, None, Mozilla(browser))
  
      # Konqueror/kfm, the KDE browser.
@@@ -482,16 -517,18 +486,18 @@@ if os.environ.get("DISPLAY")
  
  # Also try console browsers
  if os.environ.get("TERM"):
 -    if _iscommand("www-browser"):
++    if shutil.which("www-browser"):
+         register("www-browser", None, GenericBrowser("www-browser"))
      # The Links/elinks browsers <http://artax.karlin.mff.cuni.cz/~mikulas/links/>
 -    if _iscommand("links"):
 +    if shutil.which("links"):
          register("links", None, GenericBrowser("links"))
 -    if _iscommand("elinks"):
 +    if shutil.which("elinks"):
          register("elinks", None, Elinks("elinks"))
      # The Lynx browser <http://lynx.isc.org/>, <http://lynx.browser.org/>
 -    if _iscommand("lynx"):
 +    if shutil.which("lynx"):
          register("lynx", None, GenericBrowser("lynx"))
      # The w3m browser <http://w3m.sourceforge.net/>
 -    if _iscommand("w3m"):
 +    if shutil.which("w3m"):
          register("w3m", None, GenericBrowser("w3m"))
  
  #
diff --cc Misc/NEWS
index 27dc3282842840382f46f194e68d239a4e2313af,00faf3476616cae3c186dc65aebb61e0abf6190f..bfbe5665c425bf9d8e4e5dbe7c3cd029b91b32fe
+++ b/Misc/NEWS
@@@ -294,9 -196,9 +294,12 @@@ Core and Builtin
  Library
  -------
  
+ - Issue #17536: Add to webbrowser's browser list: www-browser, x-www-browser,
+   iceweasel, iceape.
 +- Issue #17150: pprint now uses line continuations to wrap long string
 +  literals.
 +
  - Issue #17488: Change the subprocess.Popen bufsize parameter default value
    from unbuffered (0) to buffering (-1) to match the behavior existing code
    expects and match the behavior of the subprocess module in Python 2 to avoid