diff piecrust/page.py @ 7:343d08ef5668

More PieCrust 3 fixes, and a couple of miscellaneous bug fixes.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 16 Aug 2014 15:07:22 -0700
parents f5ca5c5bed85
children fce061f8c2ed
line wrap: on
line diff
--- a/piecrust/page.py	Sat Aug 16 08:15:30 2014 -0700
+++ b/piecrust/page.py	Sat Aug 16 15:07:22 2014 -0700
@@ -172,7 +172,7 @@
 
     # Check the cache first.
     cache = app.cache.getCache('pages')
-    cache_path = "%s.json" % hashlib.md5(path).hexdigest()
+    cache_path = "%s.json" % hashlib.md5(path.encode('utf8')).hexdigest()
     page_time = os.path.getmtime(path)
     if cache.isValid(cache_path, page_time):
         exec_info.was_cache_valid = True