From: Neal Norwitz Date: Fri, 11 Oct 2002 22:06:12 +0000 (+0000) Subject: Backport 1.34. X-Git-Tag: v2.2.2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67f4d5204d4ded024f783df317b6918e0485aaa7;p=thirdparty%2FPython%2Fcpython.git Backport 1.34. SF # 539360, webbrowser.py and konqueror, by Andy McKay Fix Konqueror so it can start when calling open(). The assert needed to be on the raw URL, not openURL 'url...' --- diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py index 19443ca1e56c..e341ae09b6b3 100644 --- a/Lib/webbrowser.py +++ b/Lib/webbrowser.py @@ -149,8 +149,7 @@ class Konqueror: self.name = self.basename = "kfm" def _remote(self, action): - assert "'" not in action - cmd = "kfmclient '%s' >/dev/null 2>&1" % action + cmd = "kfmclient %s >/dev/null 2>&1" % action rc = os.system(cmd) if rc: import time @@ -165,6 +164,7 @@ class Konqueror: def open(self, url, new=1, autoraise=1): # XXX Currently I know no way to prevent KFM from # opening a new win. + assert "'" not in url self._remote("openURL '%s'" % url) open_new = open