summaryrefslogtreecommitdiff
path: root/extras/crystal.py
diff options
context:
space:
mode:
authorC Nelson <cnelsonsic@gmail.com>2012-04-06 12:38:22 -0500
committerC Nelson <cnelsonsic@gmail.com>2012-04-06 12:38:22 -0500
commit1d17d3e8104606da398becc8430d02aba5eea06b (patch)
tree9da62b6f7b9e6ce61f038b4f70289e06be67d8f6 /extras/crystal.py
parent8dc750b1e4c3882edb42f88c72a148275c9355b8 (diff)
Adding compatibility for newer versions of json.
Diffstat (limited to 'extras/crystal.py')
-rw-r--r--extras/crystal.py4
1 files changed, 4 insertions, 0 deletions
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