Skip to content

Commit dd50316

Browse files
authored
bpo-43137: Revert "webbrowser: Don't run gvfs-open on GNOME" (GH-30417)
gvfs-open was deprecated in 2015 and removed in 2018, but its replacement, gio(1), is not available in Ubuntu 16.04, which is apparently still supported by CPython upstream even though it is considered to be EOL by Ubuntu developers. Signed-off-by: Simon McVittie <[email protected]>
1 parent 332e6b9 commit dd50316

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Lib/webbrowser.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,10 @@ def register_X_browsers():
467467
if shutil.which("gio"):
468468
register("gio", None, BackgroundBrowser(["gio", "open", "--", "%s"]))
469469

470+
# Equivalent of gio open before 2015
471+
if "GNOME_DESKTOP_SESSION_ID" in os.environ and shutil.which("gvfs-open"):
472+
register("gvfs-open", None, BackgroundBrowser("gvfs-open"))
473+
470474
# The default KDE browser
471475
if "KDE_FULL_SESSION" in os.environ and shutil.which("kfmclient"):
472476
register("kfmclient", Konqueror, Konqueror("kfmclient"))

0 commit comments

Comments
 (0)