]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport 1.34.
authorNeal Norwitz <nnorwitz@gmail.com>
Fri, 11 Oct 2002 22:06:12 +0000 (22:06 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Fri, 11 Oct 2002 22:06:12 +0000 (22:06 +0000)
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...'

Lib/webbrowser.py

index 19443ca1e56cecd4b9e438c6d55fbb23f0213d73..e341ae09b6b315faa83a0247a9e4656976ae282a 100644 (file)
@@ -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