Ticket #4487: 0001-Replace-use-of-simplejson-SL-4487.patch

File 0001-Replace-use-of-simplejson-SL-4487.patch, 1.3 KB (added by godiard, 11 years ago)
  • speechtoolbar.py

    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  
    1515# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    1616
    1717import os
    18 import simplejson
     18import json
    1919from gettext import gettext as _
    2020
    2121from gi.repository import Gtk
    class SpeechToolbar(Gtk.Toolbar): 
    9595        if os.path.exists(data_file_name):
    9696            f = open(data_file_name, 'r')
    9797            try:
    98                 speech_parameters = simplejson.load(f)
     98                speech_parameters = json.load(f)
    9999                speech.voice = speech_parameters['voice']
    100100            finally:
    101101                f.close()
    class SpeechToolbar(Gtk.Toolbar): 
    124124        data_file_name = os.path.join(data_path, 'speech_params.json')
    125125        f = open(data_file_name, 'w')
    126126        try:
    127             simplejson.dump(speech_parameters, f)
     127            json.dump(speech_parameters, f)
    128128        finally:
    129129            f.close()
    130130