summaryrefslogtreecommitdiffstats
path: root/Lib/webbrowser.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2005-10-08 20:47:38 (GMT)
committerGeorg Brandl <georg@python.org>2005-10-08 20:47:38 (GMT)
commitb980113a8df699797b837f103ac6d2049a214551 (patch)
tree90723066b90f3eeacddcd54a39fbd587b1b81983 /Lib/webbrowser.py
parentc252c5964c076071bfc20f8c4dfe70a79dba57aa (diff)
downloadcpython-b980113a8df699797b837f103ac6d2049a214551.zip
cpython-b980113a8df699797b837f103ac6d2049a214551.tar.gz
cpython-b980113a8df699797b837f103ac6d2049a214551.tar.bz2
Fix errors in _synthesize because of missing basename attribute of
browser controller classes.
Diffstat (limited to 'Lib/webbrowser.py')
-rw-r--r--Lib/webbrowser.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py
index 1cef724..1db52d0 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"):