diff tasks/task_social_contract.py @ 6:9ce41ef66dfa

python 3 port
author Goffi <goffi@goffi.org>
date Sat, 05 Oct 2019 01:26:51 +0200
parents 09d66acc7c73
children b5fc67c97c50
line wrap: on
line diff
--- a/tasks/task_social_contract.py	Fri Jun 28 17:44:55 2019 +0200
+++ b/tasks/task_social_contract.py	Sat Oct 05 01:26:51 2019 +0200
@@ -13,9 +13,9 @@
     for filepath in glob.glob(os.path.join(sat_path, "CONTRAT_SOCIAL*")):
         filename = os.path.basename(filepath)
         with open(filepath) as f:
-            md = markdown.markdown(f.read().decode('utf-8'))
+            md = markdown.markdown(f.read())
         build_path = os.path.join(self.build_path, filename + '.html')
         with open(build_path, 'w') as f:
-            f.write(md.encode('utf-8'))
+            f.write(md)
 
-    log.info(_(u"social contract has been converted to  HTML"))
+    log.info(_("social contract has been converted to  HTML"))