Browse Source

Don't use String.partition()

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@33863 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 16 years ago
parent
commit
e1f5ed0ffe
1 changed files with 11 additions and 1 deletions
  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 != "":