From 1d17d3e8104606da398becc8430d02aba5eea06b Mon Sep 17 00:00:00 2001 From: C Nelson Date: Fri, 6 Apr 2012 12:38:22 -0500 Subject: [PATCH] Adding compatibility for newer versions of json. --- extras/crystal.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extras/crystal.py b/extras/crystal.py index 95b326dcd..211c13207 100644 --- a/extras/crystal.py +++ b/extras/crystal.py @@ -24,6 +24,10 @@ if not hasattr(unittest.TestCase, 'setUpClass'): 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