ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject [1/5] incubator-ponymail-site git commit: use IO to write unicode chars properly
Date Sun, 04 Jun 2017 12:57:10 GMT
Repository: incubator-ponymail-site
Updated Branches:
  refs/heads/asf-site e6cc338fe -> d4b174498


use IO to write unicode chars properly


Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail-site/commit/5e42d64e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail-site/tree/5e42d64e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail-site/diff/5e42d64e

Branch: refs/heads/asf-site
Commit: 5e42d64e041715117399646c0675291173d4601c
Parents: e6cc338
Author: Daniel Gruno <humbedooh@apache.org>
Authored: Sun Jun 4 14:36:45 2017 +0200
Committer: Daniel Gruno <humbedooh@apache.org>
Committed: Sun Jun 4 14:36:45 2017 +0200

----------------------------------------------------------------------
 source/generate.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail-site/blob/5e42d64e/source/generate.py
----------------------------------------------------------------------
diff --git a/source/generate.py b/source/generate.py
index a8b097b..3d32e85 100644
--- a/source/generate.py
+++ b/source/generate.py
@@ -1,6 +1,6 @@
 #!/usr/bin/python3
 
-import markdown, codecs, os, sys, re, time
+import markdown, codecs, os, sys, re, time, io
 
 
 template = ""
@@ -38,7 +38,7 @@ def runDir(path):
             if not os.path.isdir("../content/" + bpath):
                 print("Making dir %s" % bpath)
                 os.mkdir("../content/%s" % bpath)
-            with open('../content/%s' % outfile, "w") as out:
+            with io.open('../content/%s' % outfile, "w", encoding='utf8') as out:
                 out.write(html)
                 out.close()
 


Mime
View raw message