diff options
Diffstat (limited to 'src/jarabe/journal/journalentrybundle.py')
-rw-r--r-- | src/jarabe/journal/journalentrybundle.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/jarabe/journal/journalentrybundle.py b/src/jarabe/journal/journalentrybundle.py index ebe7ec3..a0bc935 100644 --- a/src/jarabe/journal/journalentrybundle.py +++ b/src/jarabe/journal/journalentrybundle.py @@ -18,7 +18,7 @@ import os import tempfile import shutil -import cjson +import json import dbus from sugar.bundle.bundle import Bundle, MalformedBundleException @@ -70,7 +70,12 @@ class JournalEntryBundle(Bundle): if not os.path.exists(metadata_path): raise MalformedBundleException( 'Bundle must contain the file "_metadata.json"') - return cjson.decode(open(metadata_path, 'r').read()) + f = open(metadata_path, 'r') + try: + json_data = f.read() + finally: + f.close() + return json.read(json_data) def _read_preview(self, uid, bundle_dir): preview_path = os.path.join(bundle_dir, 'preview', uid) |