diff piecrust/fastpickle.py @ 700:76a799eae824

internal: Fix compatibility with older Python 3.x.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 16 Apr 2016 22:13:22 -0700
parents 9e5393fcfab2
children fcfbe103cfd1
line wrap: on
line diff
--- a/piecrust/fastpickle.py	Sat Apr 16 22:12:51 2016 -0700
+++ b/piecrust/fastpickle.py	Sat Apr 16 22:13:22 2016 -0700
@@ -24,7 +24,7 @@
 
 def unpickle_fromb(buf, bufsize):
     with buf.getbuffer() as innerbuf:
-        data = codecs.decode(innerbuf[:bufsize], encoding='utf8')
+        data = codecs.decode(innerbuf[:bufsize], 'utf8')
     data = json.loads(data)
     return _unpickle_object(data)