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

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jan 14 15:29:25 PST 2019


Author: martinl
Date: 2019-01-14 15:29:25 -0800 (Mon, 14 Jan 2019)
New Revision: 73940

Modified:
   grass/trunk/tools/g.html2man/g.html2man.py
Log:
fix r73939 for python2, see #3731

Modified: grass/trunk/tools/g.html2man/g.html2man.py
===================================================================
--- grass/trunk/tools/g.html2man/g.html2man.py	2019-01-14 21:55:57 UTC (rev 73939)
+++ grass/trunk/tools/g.html2man/g.html2man.py	2019-01-14 23:29:25 UTC (rev 73940)
@@ -70,7 +70,9 @@
 
     # write groff
     with open(sys.argv[2], 'wb') as outf:
-        outf.write(s.encode('UTF-8'))
+        if sys.version_info.major >= 3:
+            s = s.encode('UTF-8')
+        outf.write(s)
 
 if __name__ == "__main__":
     main()



More information about the grass-commit mailing list