changeset 966:570226c48119 trunk

Templates should be loaded as bytes -- the encoding is passed around with the source explicitly. Fixes bugs in test suite in Python 3.3.
author hodgestar
date Sat, 29 Dec 2012 19:12:14 +0000
parents 2bfd8f8d241c
children 19ac5d8fd96c
files genshi/template/loader.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/genshi/template/loader.py
+++ b/genshi/template/loader.py
@@ -283,7 +283,7 @@
         """
         def _load_from_directory(filename):
             filepath = os.path.join(path, filename)
-            fileobj = open(filepath, 'rU')
+            fileobj = open(filepath, 'rb')
             mtime = os.path.getmtime(filepath)
             def _uptodate():
                 return mtime == os.path.getmtime(filepath)
Copyright (C) 2012-2017 Edgewall Software