summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2007-02-26 17:56:05 +0000
committerwiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2007-02-26 17:56:05 +0000
commit8e9e02d6594e1bff19bc7f0dbf975cf4cd72567f (patch)
tree8c52045d62955dc8478ab72739893751646fbfc0
parent9ba327a01ea980ae2cefda5800fc3088690c57a9 (diff)
downloaddocutils-8e9e02d6594e1bff19bc7f0dbf975cf4cd72567f.tar.gz
do not use codecs.open, because it always uses binary mode
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@4938 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
-rw-r--r--docutils/writers/html4css1/__init__.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/docutils/writers/html4css1/__init__.py b/docutils/writers/html4css1/__init__.py
index e1b472383..693672b76 100644
--- a/docutils/writers/html4css1/__init__.py
+++ b/docutils/writers/html4css1/__init__.py
@@ -17,7 +17,6 @@ __docformat__ = 'reStructuredText'
import sys
import os
import os.path
-import codecs
import time
import re
from types import ListType
@@ -159,9 +158,8 @@ class Writer(writers.Writer):
self.output = self.apply_template()
def apply_template(self):
- template_file = codecs.open(
- self.document.settings.template, 'r', 'utf-8')
- template = template_file.read()
+ template_file = open(self.document.settings.template)
+ template = unicode(template_file.read(), 'utf-8')
template_file.close()
subs = self.interpolation_dict()
return template % subs