Mercurial > kallithea
changeset 3705:f37d7514e7ab beta
always use json from compat module
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 07 Apr 2013 19:55:30 +0200 |
parents | 4839bc1d89fa |
children | 4e28db85edf7 |
files | rhodecode/bin/ldap_sync.py rhodecode/controllers/admin/repos_groups.py rhodecode/controllers/home.py rhodecode/lib/utils.py |
diffstat | 4 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/bin/ldap_sync.py Sun Apr 07 19:09:52 2013 +0200 +++ b/rhodecode/bin/ldap_sync.py Sun Apr 07 19:55:30 2013 +0200 @@ -14,7 +14,14 @@ import ldap import urllib2 import uuid -import json + +try: + from rhodecode.lib.compat import json +except ImportError: + try: + import simplejson as json + except ImportError: + import json from ConfigParser import ConfigParser
--- a/rhodecode/controllers/admin/repos_groups.py Sun Apr 07 19:09:52 2013 +0200 +++ b/rhodecode/controllers/admin/repos_groups.py Sun Apr 07 19:55:30 2013 +0200 @@ -37,7 +37,7 @@ import rhodecode from rhodecode.lib import helpers as h -from rhodecode.lib.ext_json import json +from rhodecode.lib.compat import json from rhodecode.lib.auth import LoginRequired, HasPermissionAnyDecorator,\ HasReposGroupPermissionAnyDecorator, HasReposGroupPermissionAll,\ HasPermissionAll
--- a/rhodecode/controllers/home.py Sun Apr 07 19:09:52 2013 +0200 +++ b/rhodecode/controllers/home.py Sun Apr 07 19:55:30 2013 +0200 @@ -32,7 +32,7 @@ import rhodecode from rhodecode.lib import helpers as h -from rhodecode.lib.ext_json import json +from rhodecode.lib.compat import json from rhodecode.lib.auth import LoginRequired from rhodecode.lib.base import BaseController, render from rhodecode.model.db import Repository
--- a/rhodecode/lib/utils.py Sun Apr 07 19:09:52 2013 +0200 +++ b/rhodecode/lib/utils.py Sun Apr 07 19:55:30 2013 +0200 @@ -765,7 +765,7 @@ """ from pylons.decorators.util import get_pylons - from rhodecode.lib.ext_json import json + from rhodecode.lib.compat import json pylons = get_pylons(args) pylons.response.headers['Content-Type'] = 'application/json; charset=utf-8' data = func(*args, **kwargs)