Explorar el Código

Don't use String.partition()

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@33863 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements hace 16 años
padre
commit
e1f5ed0ffe
Se han modificado 1 ficheros con 11 adiciones y 1 borrados
  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 != "":