diff genshi/template/loader.py @ 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 bef1e8701e79
children
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