diff options
author | Simon Schampijer <simon@schampijer.de> | 2012-08-08 13:17:03 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@schampijer.de> | 2012-08-08 13:40:51 (GMT) |
commit | 998fc519cc9b7a054b6c0067a6c8333d7f77012c (patch) | |
tree | 7f2da7a19b9ac96699c747116ad824537dba7119 | |
parent | ad546a1883d5c82e0ab4c1444d484c011188dc75 (diff) |
Use json as included in Python SL #3142
We use json as included in Python. This will make Sugar dependent on
Python 2.6 and Python 2.7 to have the highest JSON performance.
Remove as well the requirement in sweets.recipe
Signed-off-by: Simon Schampijer <simon@laptop.org>
Reviewed-by: Aleksey Lim <alsroot@sugarlabs.org>
-rw-r--r-- | src/carquinyol/migration.py | 5 | ||||
-rw-r--r-- | sweets.recipe | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/carquinyol/migration.py b/src/carquinyol/migration.py index 1745f2c..a39d80b 100644 --- a/src/carquinyol/migration.py +++ b/src/carquinyol/migration.py @@ -21,8 +21,7 @@ import os import logging import shutil import time - -import cjson +import json from carquinyol import layoutmanager @@ -65,7 +64,7 @@ def migrate_from_0(): def _migrate_metadata(root_path, old_root_path, uid): metadata_path = layoutmanager.get_instance().get_metadata_path(uid) old_metadata_path = os.path.join(old_root_path, uid + '.metadata') - metadata = cjson.decode(open(old_metadata_path, 'r').read()) + metadata = json.load(open(old_metadata_path, 'r')) if 'uid' not in metadata: metadata['uid'] = uid diff --git a/sweets.recipe b/sweets.recipe index b861c35..5b76e87 100644 --- a/sweets.recipe +++ b/sweets.recipe @@ -11,7 +11,7 @@ exec = %(BUILDDIR)s/bin/datastore-service binding = PATH %(BUILDDIR)s/bin PYTHONPATH %(BUILDDIR)s/src XDG_DATA_DIRS share -requires = sugar-toolkit; python-cjson; xapian-bindings-python +requires = sugar-toolkit; xapian-bindings-python [Archive] arch = any |