From 65f5d219e25e8d5d406d1bae9523aafa928bacb8 Mon Sep 17 00:00:00 2001
From: Gonzalo Odiard <godiard@gmail.com>
Date: Fri, 24 May 2013 15:40:52 -0300
Subject: [PATCH] Replace use of simplejson - SL #4487
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
---
speechtoolbar.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/speechtoolbar.py b/speechtoolbar.py
index 3ac3cb8..d6444d3 100644
a
|
b
|
|
15 | 15 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
16 | 16 | |
17 | 17 | import os |
18 | | import simplejson |
| 18 | import json |
19 | 19 | from gettext import gettext as _ |
20 | 20 | |
21 | 21 | from gi.repository import Gtk |
… |
… |
class SpeechToolbar(Gtk.Toolbar): |
95 | 95 | if os.path.exists(data_file_name): |
96 | 96 | f = open(data_file_name, 'r') |
97 | 97 | try: |
98 | | speech_parameters = simplejson.load(f) |
| 98 | speech_parameters = json.load(f) |
99 | 99 | speech.voice = speech_parameters['voice'] |
100 | 100 | finally: |
101 | 101 | f.close() |
… |
… |
class SpeechToolbar(Gtk.Toolbar): |
124 | 124 | data_file_name = os.path.join(data_path, 'speech_params.json') |
125 | 125 | f = open(data_file_name, 'w') |
126 | 126 | try: |
127 | | simplejson.dump(speech_parameters, f) |
| 127 | json.dump(speech_parameters, f) |
128 | 128 | finally: |
129 | 129 | f.close() |
130 | 130 | |