Browse Source

fix https://trac.osgeo.org/grass/changeset/73939 for python2, see https://trac.osgeo.org/grass/ticket/3731

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@73940 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 6 years ago
parent
commit
6f32c0e260
1 changed files with 3 additions and 1 deletions
  1. 3 1
      tools/g.html2man/g.html2man.py

+ 3 - 1
tools/g.html2man/g.html2man.py

@@ -70,7 +70,9 @@ def main():
 
 
     # write groff
     # write groff
     with open(sys.argv[2], 'wb') as outf:
     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__":
 if __name__ == "__main__":
     main()
     main()