浏览代码

Don't use String.partition()

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@33863 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 16 年之前
父节点
当前提交
e1f5ed0ffe
共有 1 个文件被更改,包括 11 次插入1 次删除
  1. 11 1
      tools/g.html2man/g.html2man.py

+ 11 - 1
tools/g.html2man/g.html2man.py

@@ -226,7 +226,17 @@ class Formatter:
 	self.pop()
 
     def fmt(self, format, content, var = None):
-	(pre,sep,post) = format.partition("@")
+#	String.format is only in 2.5+
+#	(pre,sep,post) = format.partition("@")
+	f = format.split('@', 1)
+	pre = f[0]
+	if len(f) > 1:
+	    sep = '@'
+	    post = f[1]
+	else:
+	    sep = ''
+	    post = ''
+
 	if pre != "":
 	    self.show(pre)
 	if sep != "":