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

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jan 14 13:55:57 PST 2019


Author: martinl
Date: 2019-01-14 13:55:57 -0800 (Mon, 14 Jan 2019)
New Revision: 73939

Modified:
   grass/trunk/tools/g.html2man/g.html2man.py
Log:
attempt to fix g.html2man wingrass python3 issue, see #3731

Modified: grass/trunk/tools/g.html2man/g.html2man.py
===================================================================
--- grass/trunk/tools/g.html2man/g.html2man.py	2019-01-14 11:13:47 UTC (rev 73938)
+++ grass/trunk/tools/g.html2man/g.html2man.py	2019-01-14 21:55:57 UTC (rev 73939)
@@ -69,9 +69,8 @@
     s = s.lstrip()
 
     # write groff
-    outf = open(sys.argv[2], 'w')
-    outf.write(s)
-    outf.close()
+    with open(sys.argv[2], 'wb') as outf:
+        outf.write(s.encode('UTF-8'))
 
 if __name__ == "__main__":
     main()



More information about the grass-commit mailing list