Fix errors in _synthesize because of missing basename attribute of

browser controller classes.
This commit is contained in:
Georg Brandl 2005-10-08 20:47:38 +00:00
parent c252c5964c
commit b980113a8d
1 changed files with 6 additions and 2 deletions

View File

@ -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"):