From b980113a8df699797b837f103ac6d2049a214551 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 8 Oct 2005 20:47:38 +0000 Subject: [PATCH] Fix errors in _synthesize because of missing basename attribute of browser controller classes. --- Lib/webbrowser.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py index 1cef7243d4e..1db52d0faff 100644 --- a/Lib/webbrowser.py +++ b/Lib/webbrowser.py @@ -133,6 +133,7 @@ class BaseBrowser(object): def __init__(self, name=""): self.name = name + self.basename = name def open(self, url, new=0, autoraise=1): raise NotImplementedError @@ -150,6 +151,7 @@ class GenericBrowser(BaseBrowser): def __init__(self, cmd): self.name, self.args = cmd.split(None, 1) + self.basename = os.path.basename(self.name) def open(self, url, new=0, autoraise=1): assert "'" not in url @@ -358,8 +360,10 @@ def register_X_browsers(): commd + " '%s' >/dev/null &")) # Konqueror/kfm, the KDE browser. - if _iscommand("kfm") or _iscommand("konqueror"): - register("kfm", Konqueror, Konqueror()) + if _iscommand("kfm"): + register("kfm", Konqueror, Konqueror("kfm")) + elif _iscommand("konqueror"): + register("konqueror", Konqueror, Konqueror("konqueror")) # Gnome's Galeon and Epiphany for browser in ("galeon", "epiphany"):