[Python-checkins] cpython: - Issue #14493: Use gvfs-open/xdg-open in Lib/webbrowser.py.
matthias.klose
python-checkins at python.org
Wed Apr 4 14:19:10 CEST 2012
http://hg.python.org/cpython/rev/70c58903b52e
changeset: 76100:70c58903b52e
user: Matthias Klose <doko at ubuntu.com>
date: Wed Apr 04 14:19:04 2012 +0200
summary:
- Issue #14493: Use gvfs-open/xdg-open in Lib/webbrowser.py.
files:
Lib/webbrowser.py | 8 ++++++++
Misc/NEWS | 2 ++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py
--- a/Lib/webbrowser.py
+++ b/Lib/webbrowser.py
@@ -448,6 +448,14 @@
def register_X_browsers():
+ # use xdg-open if around
+ if _iscommand("xdg-open"):
+ register("xdg-open", None, BackgroundBrowser("xdg-open"))
+
+ # The default GNOME3 browser
+ if "GNOME_DESKTOP_SESSION_ID" in os.environ and _iscommand("gvfs-open"):
+ register("gvfs-open", None, BackgroundBrowser("gvfs-open"))
+
# The default GNOME browser
if "GNOME_DESKTOP_SESSION_ID" in os.environ and _iscommand("gnome-open"):
register("gnome-open", None, BackgroundBrowser("gnome-open"))
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -29,6 +29,8 @@
a multiprocessing Client or Listener with an AF_PIPE type address under
non-Windows platforms. Patch by Popa Claudiu.
+- Issue #14493: Use gvfs-open/xdg-open in Lib/webbrowser.py.
+
What's New in Python 3.3.0 Alpha 2?
===================================
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list