shithub: pokecrystal

Download patch

ref: 1d17d3e8104606da398becc8430d02aba5eea06b
parent: 8dc750b1e4c3882edb42f88c72a148275c9355b8
author: C Nelson <[email protected]>
date: Fri Apr 6 08:38:22 EDT 2012

Adding compatibility for newer versions of json.

--- a/extras/crystal.py
+++ b/extras/crystal.py
@@ -24,6 +24,10 @@
 if not hasattr(json, "dumps"):
     json.dumps = json.write
 
+# New versions of json don't have read anymore.
+if not hasattr(json, "read"):
+    json.read = json.loads
+
 #table of pointers to map groups
 #each map group contains some number of map headers
 map_group_pointer_table = 0x94000