diff options
author | Simon Schampijer <simon@schampijer.de> | 2009-08-06 16:31:00 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@schampijer.de> | 2009-08-06 16:31:00 (GMT) |
commit | 041f65ae6dcdc22d235c0ef7fe05b53334a4d1ff (patch) | |
tree | 1a73e0c0c697e36d0420f309718bd6c6615f0460 /typingturtle.py | |
parent | 535b9dd9c33b0f6daf76042bf183aa94d8afc053 (diff) |
Adopt to json changes in python-2.6 #711
Diffstat (limited to 'typingturtle.py')
-rwxr-xr-x | typingturtle.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/typingturtle.py b/typingturtle.py index e9c2f9e..e09fc71 100755 --- a/typingturtle.py +++ b/typingturtle.py @@ -115,7 +115,7 @@ class TypingTurtle(sugar.activity.activity.Activity): try: text = fd.read() print "read %s" % text - self.data = json.read(text) + self.data = json.loads(text) finally: fd.close() @@ -129,7 +129,7 @@ class TypingTurtle(sugar.activity.activity.Activity): fd = open(file_path, 'w') try: - text = json.write(self.data) + text = json.dumps(self.data) fd.write(text) print "wrote %s" % text finally: |