diff options
author | Wade Brainerd <wadetb@gmail.com> | 2009-02-03 08:35:18 (GMT) |
---|---|---|
committer | Wade Brainerd <wadetb@gmail.com> | 2009-02-03 08:35:18 (GMT) |
commit | e10b0af2ed9aa4e8853fd5fd97cb4e6705685fd5 (patch) | |
tree | 06ef1215794e2516e7cf6a31bc42c492d180eaea /mainscreen.py | |
parent | ff3ddd6a739f275fff4eeab5eaf3e819ca41fc9b (diff) |
Switch to simplejson for better error reporting.
Nepali fixes.
Updated translations.
Diffstat (limited to 'mainscreen.py')
-rw-r--r-- | mainscreen.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mainscreen.py b/mainscreen.py index 64b95bc..a371490 100644 --- a/mainscreen.py +++ b/mainscreen.py @@ -15,7 +15,7 @@ # along with Typing Turtle. If not, see <http://www.gnu.org/licenses/>. # Import standard Python modules. -import logging, os, math, time, copy, json, locale, datetime, random, re, glob +import logging, os, math, time, copy, simplejson, locale, datetime, random, re, glob from gettext import gettext as _ # Import PyGTK. @@ -115,6 +115,7 @@ class MainScreen(gtk.VBox): # Load lessons for this language. bundle_path = sugar.activity.activity.get_bundle_path() code = locale.getlocale(locale.LC_ALL)[0] + code = 'ne_NP' path = bundle_path + '/lessons/' + code self.load_lessons(path) @@ -150,7 +151,7 @@ class MainScreen(gtk.VBox): for f in glob.iglob(path + '/*.lesson'): fd = open(f, 'r') try: - lesson = json.read(fd.read()) + lesson = simplejson.loads(fd.read()) self.lessons.append(lesson) finally: fd.close() |