[GRASS-SVN] r33863 - grass/trunk/tools/g.html2man

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Oct 13 06:18:25 EDT 2008


Author: glynn
Date: 2008-10-13 06:18:25 -0400 (Mon, 13 Oct 2008)
New Revision: 33863

Modified:
   grass/trunk/tools/g.html2man/g.html2man.py
Log:
Don't use String.partition()


Modified: grass/trunk/tools/g.html2man/g.html2man.py
===================================================================
--- grass/trunk/tools/g.html2man/g.html2man.py	2008-10-13 08:35:30 UTC (rev 33862)
+++ grass/trunk/tools/g.html2man/g.html2man.py	2008-10-13 10:18:25 UTC (rev 33863)
@@ -226,7 +226,17 @@
 	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 != "":



More information about the grass-commit mailing list